server: Make async I/O transfer sizes always 32-bit.
[wine/multimedia.git] / server / protocol.def
blob30654fae8fb527571b4db05982b81aee550d7001
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 long lparam_t;
42 typedef unsigned long apc_param_t;
43 typedef unsigned __int64 file_pos_t;
45 struct request_header
47 int req; /* request code */
48 data_size_t request_size; /* request variable part size */
49 data_size_t reply_size; /* reply variable part maximum size */
52 struct reply_header
54 unsigned int error; /* error result */
55 data_size_t reply_size; /* reply variable part size */
58 /* placeholder structure for the maximum allowed request size */
59 /* this is used to construct the generic_request union */
60 struct request_max_size
62 int pad[16]; /* the max request size is 16 ints */
65 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
66 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
69 /* definitions of the event data depending on the event code */
70 struct debug_event_exception
72 EXCEPTION_RECORD record; /* exception record */
73 int first; /* first chance exception? */
75 struct debug_event_create_thread
77 obj_handle_t handle; /* handle to the new thread */
78 void *teb; /* thread teb (in debugged process address space) */
79 void *start; /* thread startup routine */
81 struct debug_event_create_process
83 obj_handle_t file; /* handle to the process exe file */
84 obj_handle_t process; /* handle to the new process */
85 obj_handle_t thread; /* handle to the new thread */
86 void *base; /* base of executable image */
87 int dbg_offset; /* offset of debug info in file */
88 int dbg_size; /* size of debug info */
89 void *teb; /* thread teb (in debugged process address space) */
90 void *start; /* thread startup routine */
91 void *name; /* image name (optional) */
92 int unicode; /* is it Unicode? */
94 struct debug_event_exit
96 int exit_code; /* thread or process exit code */
98 struct debug_event_load_dll
100 obj_handle_t handle; /* file handle for the dll */
101 void *base; /* base address of the dll */
102 int dbg_offset; /* offset of debug info in file */
103 int dbg_size; /* size of debug info */
104 void *name; /* image name (optional) */
105 int unicode; /* is it Unicode? */
107 struct debug_event_unload_dll
109 void *base; /* base address of the dll */
111 struct debug_event_output_string
113 void *string; /* string to display (in debugged process address space) */
114 int unicode; /* is it Unicode? */
115 int length; /* string length */
117 struct debug_event_rip_info
119 int error; /* ??? */
120 int type; /* ??? */
122 union debug_event_data
124 struct debug_event_exception exception;
125 struct debug_event_create_thread create_thread;
126 struct debug_event_create_process create_process;
127 struct debug_event_exit exit;
128 struct debug_event_load_dll load_dll;
129 struct debug_event_unload_dll unload_dll;
130 struct debug_event_output_string output_string;
131 struct debug_event_rip_info rip_info;
134 /* debug event data */
135 typedef struct
137 int code; /* event code */
138 union debug_event_data info; /* event information */
139 } debug_event_t;
141 /* structure used in sending an fd from client to server */
142 struct send_fd
144 thread_id_t tid; /* thread id */
145 int fd; /* file descriptor on client-side */
148 /* structure sent by the server on the wait fifo */
149 struct wake_up_reply
151 void *cookie; /* magic cookie that was passed in select_request */
152 int signaled; /* wait result */
155 /* NT-style timeout, in 100ns units, negative means relative timeout */
156 typedef __int64 timeout_t;
157 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
159 /* structure returned in the list of window properties */
160 typedef struct
162 atom_t atom; /* property atom */
163 short string; /* was atom a string originally? */
164 lparam_t data; /* data stored in property */
165 } property_data_t;
167 /* structure to specify window rectangles */
168 typedef struct
170 int left;
171 int top;
172 int right;
173 int bottom;
174 } rectangle_t;
176 /* structure for parameters of async I/O calls */
177 typedef struct
179 void *callback; /* client-side callback to call upon end of async */
180 void *iosb; /* I/O status block in client addr space */
181 void *arg; /* opaque user data to pass to callback */
182 void *apc; /* user apc to call */
183 obj_handle_t event; /* event to signal when done */
184 apc_param_t cvalue; /* completion value to use for completion events */
185 } async_data_t;
187 /* structures for extra message data */
189 struct callback_msg_data
191 void *callback; /* callback function */
192 lparam_t data; /* user data for callback */
193 lparam_t result; /* message result */
196 struct winevent_msg_data
198 user_handle_t hook; /* hook handle */
199 thread_id_t tid; /* thread id */
200 void *hook_proc; /* hook proc address */
201 /* followed by module name if any */
204 typedef union
206 unsigned char bytes[1]; /* raw data for sent messages */
207 struct callback_msg_data callback;
208 struct winevent_msg_data winevent;
209 } message_data_t;
211 /* structure for console char/attribute info */
212 typedef struct
214 WCHAR ch;
215 unsigned short attr;
216 } char_info_t;
218 typedef struct
220 unsigned int low_part;
221 int high_part;
222 } luid_t;
224 #define MAX_ACL_LEN 65535
226 struct security_descriptor
228 unsigned int control; /* SE_ flags */
229 data_size_t owner_len;
230 data_size_t group_len;
231 data_size_t sacl_len;
232 data_size_t dacl_len;
233 /* VARARG(owner,SID); */
234 /* VARARG(group,SID); */
235 /* VARARG(sacl,ACL); */
236 /* VARARG(dacl,ACL); */
239 struct object_attributes
241 obj_handle_t rootdir; /* root directory */
242 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
243 data_size_t name_len; /* length of the name string. may be 0 */
244 /* VARARG(sd,security_descriptor); */
245 /* VARARG(name,unicode_str); */
248 struct token_groups
250 unsigned int count;
251 /* unsigned int attributes[count]; */
252 /* VARARG(sids,SID); */
255 enum apc_type
257 APC_NONE,
258 APC_USER,
259 APC_TIMER,
260 APC_ASYNC_IO,
261 APC_VIRTUAL_ALLOC,
262 APC_VIRTUAL_FREE,
263 APC_VIRTUAL_QUERY,
264 APC_VIRTUAL_PROTECT,
265 APC_VIRTUAL_FLUSH,
266 APC_VIRTUAL_LOCK,
267 APC_VIRTUAL_UNLOCK,
268 APC_MAP_VIEW,
269 APC_UNMAP_VIEW,
270 APC_CREATE_THREAD
273 typedef union
275 enum apc_type type;
276 struct
278 enum apc_type type; /* APC_USER */
279 void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
280 apc_param_t args[3]; /* arguments for user function */
281 } user;
282 struct
284 enum apc_type type; /* APC_TIMER */
285 void (__stdcall *func)(void*, unsigned int, unsigned int);
286 timeout_t time; /* absolute time of expiration */
287 void *arg; /* user argument */
288 } timer;
289 struct
291 enum apc_type type; /* APC_ASYNC_IO */
292 unsigned int (*func)(void*, void*, unsigned int, unsigned int *);
293 void *user; /* user pointer */
294 void *sb; /* status block */
295 unsigned int status; /* I/O status */
296 } async_io;
297 struct
299 enum apc_type type; /* APC_VIRTUAL_ALLOC */
300 void *addr; /* requested address */
301 unsigned long size; /* allocation size */
302 unsigned int zero_bits; /* allocation alignment */
303 unsigned int op_type; /* type of operation */
304 unsigned int prot; /* memory protection flags */
305 } virtual_alloc;
306 struct
308 enum apc_type type; /* APC_VIRTUAL_FREE */
309 void *addr; /* requested address */
310 unsigned long size; /* allocation size */
311 unsigned int op_type; /* type of operation */
312 } virtual_free;
313 struct
315 enum apc_type type; /* APC_VIRTUAL_QUERY */
316 const void *addr; /* requested address */
317 } virtual_query;
318 struct
320 enum apc_type type; /* APC_VIRTUAL_PROTECT */
321 void *addr; /* requested address */
322 unsigned long size; /* requested address */
323 unsigned int prot; /* new protection flags */
324 } virtual_protect;
325 struct
327 enum apc_type type; /* APC_VIRTUAL_FLUSH */
328 const void *addr; /* requested address */
329 unsigned long size; /* requested address */
330 } virtual_flush;
331 struct
333 enum apc_type type; /* APC_VIRTUAL_LOCK */
334 void *addr; /* requested address */
335 unsigned long size; /* requested address */
336 } virtual_lock;
337 struct
339 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
340 void *addr; /* requested address */
341 unsigned long size; /* requested address */
342 } virtual_unlock;
343 struct
345 enum apc_type type; /* APC_MAP_VIEW */
346 obj_handle_t handle; /* mapping handle */
347 void *addr; /* requested address */
348 unsigned long size; /* allocation size */
349 file_pos_t offset; /* file offset */
350 unsigned int zero_bits; /* allocation alignment */
351 unsigned int alloc_type;/* allocation type */
352 unsigned int prot; /* memory protection flags */
353 } map_view;
354 struct
356 enum apc_type type; /* APC_UNMAP_VIEW */
357 void *addr; /* view address */
358 } unmap_view;
359 struct
361 enum apc_type type; /* APC_CREATE_THREAD */
362 void (__stdcall *func)(void*); /* start function */
363 void *arg; /* argument for start function */
364 unsigned long reserve; /* reserve size for thread stack */
365 unsigned long commit; /* commit size for thread stack */
366 int suspend; /* suspended thread? */
367 } create_thread;
368 } apc_call_t;
370 typedef union
372 enum apc_type type;
373 struct
375 enum apc_type type; /* APC_ASYNC_IO */
376 unsigned int status; /* new status of async operation */
377 unsigned int total; /* bytes transferred */
378 } async_io;
379 struct
381 enum apc_type type; /* APC_VIRTUAL_ALLOC */
382 unsigned int status; /* status returned by call */
383 void *addr; /* resulting address */
384 unsigned long size; /* resulting size */
385 } virtual_alloc;
386 struct
388 enum apc_type type; /* APC_VIRTUAL_FREE */
389 unsigned int status; /* status returned by call */
390 void *addr; /* resulting address */
391 unsigned long size; /* resulting size */
392 } virtual_free;
393 struct
395 enum apc_type type; /* APC_VIRTUAL_QUERY */
396 unsigned int status; /* status returned by call */
397 void *base; /* resulting base address */
398 void *alloc_base;/* resulting allocation base */
399 unsigned long size; /* resulting region size */
400 unsigned int state; /* resulting region state */
401 unsigned int prot; /* resulting region protection */
402 unsigned int alloc_prot;/* resulting allocation protection */
403 unsigned int alloc_type;/* resulting region allocation type */
404 } virtual_query;
405 struct
407 enum apc_type type; /* APC_VIRTUAL_PROTECT */
408 unsigned int status; /* status returned by call */
409 void *addr; /* resulting address */
410 unsigned long size; /* resulting size */
411 unsigned int prot; /* old protection flags */
412 } virtual_protect;
413 struct
415 enum apc_type type; /* APC_VIRTUAL_FLUSH */
416 unsigned int status; /* status returned by call */
417 const void *addr; /* resulting address */
418 unsigned long size; /* resulting size */
419 } virtual_flush;
420 struct
422 enum apc_type type; /* APC_VIRTUAL_LOCK */
423 unsigned int status; /* status returned by call */
424 void *addr; /* resulting address */
425 unsigned long size; /* resulting size */
426 } virtual_lock;
427 struct
429 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
430 unsigned int status; /* status returned by call */
431 void *addr; /* resulting address */
432 unsigned long size; /* resulting size */
433 } virtual_unlock;
434 struct
436 enum apc_type type; /* APC_MAP_VIEW */
437 unsigned int status; /* status returned by call */
438 void *addr; /* resulting address */
439 unsigned long size; /* resulting size */
440 } map_view;
441 struct
443 enum apc_type type; /* APC_MAP_VIEW */
444 unsigned int status; /* status returned by call */
445 } unmap_view;
446 struct
448 enum apc_type type; /* APC_CREATE_THREAD */
449 unsigned int status; /* status returned by call */
450 thread_id_t tid; /* thread id */
451 obj_handle_t handle; /* handle to new thread */
452 } create_thread;
453 } apc_result_t;
455 /****************************************************************/
456 /* Request declarations */
458 /* Create a new process from the context of the parent */
459 @REQ(new_process)
460 int inherit_all; /* inherit all handles from parent */
461 unsigned int create_flags; /* creation flags */
462 int socket_fd; /* file descriptor for process socket */
463 obj_handle_t exe_file; /* file handle for main exe */
464 obj_handle_t hstdin; /* handle for stdin */
465 obj_handle_t hstdout; /* handle for stdout */
466 obj_handle_t hstderr; /* handle for stderr */
467 unsigned int process_access; /* access rights for process object */
468 unsigned int process_attr; /* attributes for process object */
469 unsigned int thread_access; /* access rights for thread object */
470 unsigned int thread_attr; /* attributes for thread object */
471 VARARG(info,startup_info); /* startup information */
472 VARARG(env,unicode_str); /* environment for new process */
473 @REPLY
474 obj_handle_t info; /* new process info handle */
475 process_id_t pid; /* process id */
476 obj_handle_t phandle; /* process handle (in the current process) */
477 thread_id_t tid; /* thread id */
478 obj_handle_t thandle; /* thread handle (in the current process) */
479 @END
482 /* Retrieve information about a newly started process */
483 @REQ(get_new_process_info)
484 obj_handle_t info; /* info handle returned from new_process_request */
485 @REPLY
486 int success; /* did the process start successfully? */
487 int exit_code; /* process exit code if failed */
488 @END
491 /* Create a new thread from the context of the parent */
492 @REQ(new_thread)
493 unsigned int access; /* wanted access rights */
494 unsigned int attributes; /* object attributes */
495 int suspend; /* new thread should be suspended on creation */
496 int request_fd; /* fd for request pipe */
497 @REPLY
498 thread_id_t tid; /* thread id */
499 obj_handle_t handle; /* thread handle (in the current process) */
500 @END
503 /* Retrieve the new process startup info */
504 @REQ(get_startup_info)
505 @REPLY
506 obj_handle_t exe_file; /* file handle for main exe */
507 obj_handle_t hstdin; /* handle for stdin */
508 obj_handle_t hstdout; /* handle for stdout */
509 obj_handle_t hstderr; /* handle for stderr */
510 VARARG(info,startup_info); /* startup information */
511 VARARG(env,unicode_str); /* environment */
512 @END
515 /* Signal the end of the process initialization */
516 @REQ(init_process_done)
517 void* module; /* main module base address */
518 void* entry; /* process entry point */
519 int gui; /* is it a GUI process? */
520 @END
523 /* Initialize a thread; called from the child after fork()/clone() */
524 @REQ(init_thread)
525 int unix_pid; /* Unix pid of new thread */
526 int unix_tid; /* Unix tid of new thread */
527 int debug_level; /* new debug level */
528 void* teb; /* TEB of new thread (in thread address space) */
529 void* peb; /* address of PEB (in thread address space) */
530 void* entry; /* thread entry point (in thread address space) */
531 void* ldt_copy; /* address of LDT copy (in thread address space) */
532 int reply_fd; /* fd for reply pipe */
533 int wait_fd; /* fd for blocking calls pipe */
534 @REPLY
535 process_id_t pid; /* process id of the new thread's process */
536 thread_id_t tid; /* thread id of the new thread */
537 data_size_t info_size; /* total size of startup info */
538 timeout_t server_start; /* server start time */
539 int version; /* protocol version */
540 @END
543 /* Terminate a process */
544 @REQ(terminate_process)
545 obj_handle_t handle; /* process handle to terminate */
546 int exit_code; /* process exit code */
547 @REPLY
548 int self; /* suicide? */
549 @END
552 /* Terminate a thread */
553 @REQ(terminate_thread)
554 obj_handle_t handle; /* thread handle to terminate */
555 int exit_code; /* thread exit code */
556 @REPLY
557 int self; /* suicide? */
558 int last; /* last thread in this process? */
559 @END
562 /* Retrieve information about a process */
563 @REQ(get_process_info)
564 obj_handle_t handle; /* process handle */
565 @REPLY
566 process_id_t pid; /* server process id */
567 process_id_t ppid; /* server process id of parent */
568 int exit_code; /* process exit code */
569 int priority; /* priority class */
570 unsigned int affinity; /* process affinity mask */
571 void* peb; /* PEB address in process address space */
572 timeout_t start_time; /* process start time */
573 timeout_t end_time; /* process end time */
574 @END
577 /* Set a process informations */
578 @REQ(set_process_info)
579 obj_handle_t handle; /* process handle */
580 int mask; /* setting mask (see below) */
581 int priority; /* priority class */
582 unsigned int affinity; /* affinity mask */
583 @END
584 #define SET_PROCESS_INFO_PRIORITY 0x01
585 #define SET_PROCESS_INFO_AFFINITY 0x02
588 /* Retrieve information about a thread */
589 @REQ(get_thread_info)
590 obj_handle_t handle; /* thread handle */
591 thread_id_t tid_in; /* thread id (optional) */
592 @REPLY
593 process_id_t pid; /* server process id */
594 thread_id_t tid; /* server thread id */
595 void* teb; /* thread teb pointer */
596 int exit_code; /* thread exit code */
597 int priority; /* thread priority level */
598 unsigned int affinity; /* thread affinity mask */
599 timeout_t creation_time; /* thread creation time */
600 timeout_t exit_time; /* thread exit time */
601 int last; /* last thread in process */
602 @END
605 /* Set a thread informations */
606 @REQ(set_thread_info)
607 obj_handle_t handle; /* thread handle */
608 int mask; /* setting mask (see below) */
609 int priority; /* priority class */
610 unsigned int affinity; /* affinity mask */
611 obj_handle_t token; /* impersonation token */
612 @END
613 #define SET_THREAD_INFO_PRIORITY 0x01
614 #define SET_THREAD_INFO_AFFINITY 0x02
615 #define SET_THREAD_INFO_TOKEN 0x04
618 /* Retrieve information about a module */
619 @REQ(get_dll_info)
620 obj_handle_t handle; /* process handle */
621 void* base_address; /* base address of module */
622 @REPLY
623 void* entry_point;
624 data_size_t size; /* module size */
625 data_size_t filename_len; /* buffer len in bytes required to store filename */
626 VARARG(filename,unicode_str); /* file name of module */
627 @END
630 /* Suspend a thread */
631 @REQ(suspend_thread)
632 obj_handle_t handle; /* thread handle */
633 @REPLY
634 int count; /* new suspend count */
635 @END
638 /* Resume a thread */
639 @REQ(resume_thread)
640 obj_handle_t handle; /* thread handle */
641 @REPLY
642 int count; /* new suspend count */
643 @END
646 /* Notify the server that a dll has been loaded */
647 @REQ(load_dll)
648 obj_handle_t handle; /* file handle */
649 void* base; /* base address */
650 void* name; /* ptr to ptr to name (in process addr space) */
651 data_size_t size; /* dll size */
652 int dbg_offset; /* debug info offset */
653 int dbg_size; /* debug info size */
654 VARARG(filename,unicode_str); /* file name of dll */
655 @END
658 /* Notify the server that a dll is being unloaded */
659 @REQ(unload_dll)
660 void* base; /* base address */
661 @END
664 /* Queue an APC for a thread or process */
665 @REQ(queue_apc)
666 obj_handle_t thread; /* thread handle */
667 obj_handle_t process; /* process handle */
668 apc_call_t call; /* call arguments */
669 @REPLY
670 obj_handle_t handle; /* APC handle */
671 int self; /* run APC in caller itself? */
672 @END
675 /* Get the result of an APC call */
676 @REQ(get_apc_result)
677 obj_handle_t handle; /* handle to the APC */
678 @REPLY
679 apc_result_t result; /* result of the APC */
680 @END
683 /* Close a handle for the current process */
684 @REQ(close_handle)
685 obj_handle_t handle; /* handle to close */
686 @END
689 /* Set a handle information */
690 @REQ(set_handle_info)
691 obj_handle_t handle; /* handle we are interested in */
692 int flags; /* new handle flags */
693 int mask; /* mask for flags to set */
694 @REPLY
695 int old_flags; /* old flag value */
696 @END
699 /* Duplicate a handle */
700 @REQ(dup_handle)
701 obj_handle_t src_process; /* src process handle */
702 obj_handle_t src_handle; /* src handle to duplicate */
703 obj_handle_t dst_process; /* dst process handle */
704 unsigned int access; /* wanted access rights */
705 unsigned int attributes; /* object attributes */
706 unsigned int options; /* duplicate options (see below) */
707 @REPLY
708 obj_handle_t handle; /* duplicated handle in dst process */
709 int self; /* is the source the current process? */
710 int closed; /* whether the source handle has been closed */
711 @END
712 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
713 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
714 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
717 /* Open a handle to a process */
718 @REQ(open_process)
719 process_id_t pid; /* process id to open */
720 unsigned int access; /* wanted access rights */
721 unsigned int attributes; /* object attributes */
722 @REPLY
723 obj_handle_t handle; /* handle to the process */
724 @END
727 /* Open a handle to a thread */
728 @REQ(open_thread)
729 thread_id_t tid; /* thread id to open */
730 unsigned int access; /* wanted access rights */
731 unsigned int attributes; /* object attributes */
732 @REPLY
733 obj_handle_t handle; /* handle to the thread */
734 @END
737 /* Wait for handles */
738 @REQ(select)
739 int flags; /* wait flags (see below) */
740 void* cookie; /* magic cookie to return to client */
741 obj_handle_t signal; /* object to signal (0 if none) */
742 obj_handle_t prev_apc; /* handle to previous APC */
743 timeout_t timeout; /* timeout */
744 VARARG(result,apc_result); /* result of previous APC */
745 VARARG(handles,handles); /* handles to select on */
746 @REPLY
747 obj_handle_t apc_handle; /* handle to next APC */
748 timeout_t timeout; /* timeout converted to absolute */
749 apc_call_t call; /* APC call arguments */
750 @END
751 #define SELECT_ALL 1
752 #define SELECT_ALERTABLE 2
753 #define SELECT_INTERRUPTIBLE 4
756 /* Create an event */
757 @REQ(create_event)
758 unsigned int access; /* wanted access rights */
759 unsigned int attributes; /* object attributes */
760 int manual_reset; /* manual reset event */
761 int initial_state; /* initial state of the event */
762 VARARG(objattr,object_attributes); /* object attributes */
763 @REPLY
764 obj_handle_t handle; /* handle to the event */
765 @END
767 /* Event operation */
768 @REQ(event_op)
769 obj_handle_t handle; /* handle to event */
770 int op; /* event operation (see below) */
771 @END
772 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
775 /* Open an event */
776 @REQ(open_event)
777 unsigned int access; /* wanted access rights */
778 unsigned int attributes; /* object attributes */
779 obj_handle_t rootdir; /* root directory */
780 VARARG(name,unicode_str); /* object name */
781 @REPLY
782 obj_handle_t handle; /* handle to the event */
783 @END
786 /* Create a mutex */
787 @REQ(create_mutex)
788 unsigned int access; /* wanted access rights */
789 unsigned int attributes; /* object attributes */
790 int owned; /* initially owned? */
791 VARARG(objattr,object_attributes); /* object attributes */
792 @REPLY
793 obj_handle_t handle; /* handle to the mutex */
794 @END
797 /* Release a mutex */
798 @REQ(release_mutex)
799 obj_handle_t handle; /* handle to the mutex */
800 @REPLY
801 unsigned int prev_count; /* value of internal counter, before release */
802 @END
805 /* Open a mutex */
806 @REQ(open_mutex)
807 unsigned int access; /* wanted access rights */
808 unsigned int attributes; /* object attributes */
809 obj_handle_t rootdir; /* root directory */
810 VARARG(name,unicode_str); /* object name */
811 @REPLY
812 obj_handle_t handle; /* handle to the mutex */
813 @END
816 /* Create a semaphore */
817 @REQ(create_semaphore)
818 unsigned int access; /* wanted access rights */
819 unsigned int attributes; /* object attributes */
820 unsigned int initial; /* initial count */
821 unsigned int max; /* maximum count */
822 VARARG(objattr,object_attributes); /* object attributes */
823 @REPLY
824 obj_handle_t handle; /* handle to the semaphore */
825 @END
828 /* Release a semaphore */
829 @REQ(release_semaphore)
830 obj_handle_t handle; /* handle to the semaphore */
831 unsigned int count; /* count to add to semaphore */
832 @REPLY
833 unsigned int prev_count; /* previous semaphore count */
834 @END
837 /* Open a semaphore */
838 @REQ(open_semaphore)
839 unsigned int access; /* wanted access rights */
840 unsigned int attributes; /* object attributes */
841 obj_handle_t rootdir; /* root directory */
842 VARARG(name,unicode_str); /* object name */
843 @REPLY
844 obj_handle_t handle; /* handle to the semaphore */
845 @END
848 /* Create a file */
849 @REQ(create_file)
850 unsigned int access; /* wanted access rights */
851 unsigned int attributes; /* object attributes */
852 unsigned int sharing; /* sharing flags */
853 int create; /* file create action */
854 unsigned int options; /* file options */
855 unsigned int attrs; /* file attributes for creation */
856 VARARG(objattr,object_attributes); /* object attributes */
857 VARARG(filename,string); /* file name */
858 @REPLY
859 obj_handle_t handle; /* handle to the file */
860 @END
863 /* Open a file object */
864 @REQ(open_file_object)
865 unsigned int access; /* wanted access rights */
866 unsigned int attributes; /* open attributes */
867 obj_handle_t rootdir; /* root directory */
868 unsigned int sharing; /* sharing flags */
869 unsigned int options; /* file options */
870 VARARG(filename,unicode_str); /* file name */
871 @REPLY
872 obj_handle_t handle; /* handle to the file */
873 @END
876 /* Allocate a file handle for a Unix fd */
877 @REQ(alloc_file_handle)
878 unsigned int access; /* wanted access rights */
879 unsigned int attributes; /* object attributes */
880 int fd; /* file descriptor on the client side */
881 @REPLY
882 obj_handle_t handle; /* handle to the file */
883 @END
886 /* Get a Unix fd to access a file */
887 @REQ(get_handle_fd)
888 obj_handle_t handle; /* handle to the file */
889 @REPLY
890 int type; /* file type (see below) */
891 int removable; /* is file removable? */
892 unsigned int access; /* file access rights */
893 unsigned int options; /* file open options */
894 @END
895 enum server_fd_type
897 FD_TYPE_INVALID, /* invalid file (no associated fd) */
898 FD_TYPE_FILE, /* regular file */
899 FD_TYPE_DIR, /* directory */
900 FD_TYPE_SOCKET, /* socket */
901 FD_TYPE_SERIAL, /* serial port */
902 FD_TYPE_PIPE, /* named pipe */
903 FD_TYPE_MAILSLOT, /* mailslot */
904 FD_TYPE_CHAR, /* unspecified char device */
905 FD_TYPE_DEVICE, /* Windows device file */
906 FD_TYPE_NB_TYPES
910 /* Flush a file buffers */
911 @REQ(flush_file)
912 obj_handle_t handle; /* handle to the file */
913 @REPLY
914 obj_handle_t event; /* event set when finished */
915 @END
918 /* Lock a region of a file */
919 @REQ(lock_file)
920 obj_handle_t handle; /* handle to the file */
921 file_pos_t offset; /* offset of start of lock */
922 file_pos_t count; /* count of bytes to lock */
923 int shared; /* shared or exclusive lock? */
924 int wait; /* do we want to wait? */
925 @REPLY
926 obj_handle_t handle; /* handle to wait on */
927 int overlapped; /* is it an overlapped I/O handle? */
928 @END
931 /* Unlock a region of a file */
932 @REQ(unlock_file)
933 obj_handle_t handle; /* handle to the file */
934 file_pos_t offset; /* offset of start of unlock */
935 file_pos_t count; /* count of bytes to unlock */
936 @END
939 /* Create a socket */
940 @REQ(create_socket)
941 unsigned int access; /* wanted access rights */
942 unsigned int attributes; /* object attributes */
943 int family; /* family, see socket manpage */
944 int type; /* type, see socket manpage */
945 int protocol; /* protocol, see socket manpage */
946 unsigned int flags; /* socket flags */
947 @REPLY
948 obj_handle_t handle; /* handle to the new socket */
949 @END
952 /* Accept a socket */
953 @REQ(accept_socket)
954 obj_handle_t lhandle; /* handle to the listening socket */
955 unsigned int access; /* wanted access rights */
956 unsigned int attributes; /* object attributes */
957 @REPLY
958 obj_handle_t handle; /* handle to the new socket */
959 @END
962 /* Set socket event parameters */
963 @REQ(set_socket_event)
964 obj_handle_t handle; /* handle to the socket */
965 unsigned int mask; /* event mask */
966 obj_handle_t event; /* event object */
967 user_handle_t window; /* window to send the message to */
968 unsigned int msg; /* message to send */
969 @END
972 /* Get socket event parameters */
973 @REQ(get_socket_event)
974 obj_handle_t handle; /* handle to the socket */
975 int service; /* clear pending? */
976 obj_handle_t c_event; /* event to clear */
977 @REPLY
978 unsigned int mask; /* event mask */
979 unsigned int pmask; /* pending events */
980 unsigned int state; /* status bits */
981 VARARG(errors,ints); /* event errors */
982 @END
985 /* Reenable pending socket events */
986 @REQ(enable_socket_event)
987 obj_handle_t handle; /* handle to the socket */
988 unsigned int mask; /* events to re-enable */
989 unsigned int sstate; /* status bits to set */
990 unsigned int cstate; /* status bits to clear */
991 @END
993 @REQ(set_socket_deferred)
994 obj_handle_t handle; /* handle to the socket */
995 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
996 @END
998 /* Allocate a console (only used by a console renderer) */
999 @REQ(alloc_console)
1000 unsigned int access; /* wanted access rights */
1001 unsigned int attributes; /* object attributes */
1002 process_id_t pid; /* pid of process which shall be attached to the console */
1003 @REPLY
1004 obj_handle_t handle_in; /* handle to console input */
1005 obj_handle_t event; /* handle to renderer events change notification */
1006 @END
1009 /* Free the console of the current process */
1010 @REQ(free_console)
1011 @END
1014 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1015 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1016 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1017 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1018 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1019 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1020 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1021 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1022 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1023 struct console_renderer_event
1025 short event;
1026 union
1028 struct update
1030 short top;
1031 short bottom;
1032 } update;
1033 struct resize
1035 short width;
1036 short height;
1037 } resize;
1038 struct cursor_pos
1040 short x;
1041 short y;
1042 } cursor_pos;
1043 struct cursor_geom
1045 short visible;
1046 short size;
1047 } cursor_geom;
1048 struct display
1050 short left;
1051 short top;
1052 short width;
1053 short height;
1054 } display;
1055 } u;
1058 /* retrieve console events for the renderer */
1059 @REQ(get_console_renderer_events)
1060 obj_handle_t handle; /* handle to console input events */
1061 @REPLY
1062 VARARG(data,bytes); /* the various console_renderer_events */
1063 @END
1066 /* Open a handle to the process console */
1067 @REQ(open_console)
1068 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1069 /* otherwise console_in handle to get active screen buffer? */
1070 unsigned int access; /* wanted access rights */
1071 unsigned int attributes; /* object attributes */
1072 int share; /* share mask (only for output handles) */
1073 @REPLY
1074 obj_handle_t handle; /* handle to the console */
1075 @END
1078 /* Get the input queue wait event */
1079 @REQ(get_console_wait_event)
1080 @REPLY
1081 obj_handle_t handle;
1082 @END
1084 /* Get a console mode (input or output) */
1085 @REQ(get_console_mode)
1086 obj_handle_t handle; /* handle to the console */
1087 @REPLY
1088 int mode; /* console mode */
1089 @END
1092 /* Set a console mode (input or output) */
1093 @REQ(set_console_mode)
1094 obj_handle_t handle; /* handle to the console */
1095 int mode; /* console mode */
1096 @END
1099 /* Set info about a console (input only) */
1100 @REQ(set_console_input_info)
1101 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1102 int mask; /* setting mask (see below) */
1103 obj_handle_t active_sb; /* active screen buffer */
1104 int history_mode; /* whether we duplicate lines in history */
1105 int history_size; /* number of lines in history */
1106 int edition_mode; /* index to the edition mode flavors */
1107 int input_cp; /* console input codepage */
1108 int output_cp; /* console output codepage */
1109 user_handle_t win; /* console window if backend supports it */
1110 VARARG(title,unicode_str); /* console title */
1111 @END
1112 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1113 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1114 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1115 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1116 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1117 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1118 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1119 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1122 /* Get info about a console (input only) */
1123 @REQ(get_console_input_info)
1124 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1125 @REPLY
1126 int history_mode; /* whether we duplicate lines in history */
1127 int history_size; /* number of lines in history */
1128 int history_index; /* number of used lines in history */
1129 int edition_mode; /* index to the edition mode flavors */
1130 int input_cp; /* console input codepage */
1131 int output_cp; /* console output codepage */
1132 user_handle_t win; /* console window if backend supports it */
1133 VARARG(title,unicode_str); /* console title */
1134 @END
1137 /* appends a string to console's history */
1138 @REQ(append_console_input_history)
1139 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1140 VARARG(line,unicode_str); /* line to add */
1141 @END
1144 /* appends a string to console's history */
1145 @REQ(get_console_input_history)
1146 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1147 int index; /* index to get line from */
1148 @REPLY
1149 int total; /* total length of line in Unicode chars */
1150 VARARG(line,unicode_str); /* line to add */
1151 @END
1154 /* creates a new screen buffer on process' console */
1155 @REQ(create_console_output)
1156 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1157 unsigned int access; /* wanted access rights */
1158 unsigned int attributes; /* object attributes */
1159 unsigned int share; /* sharing credentials */
1160 @REPLY
1161 obj_handle_t handle_out; /* handle to the screen buffer */
1162 @END
1165 /* Set info about a console (output only) */
1166 @REQ(set_console_output_info)
1167 obj_handle_t handle; /* handle to the console */
1168 int mask; /* setting mask (see below) */
1169 short int cursor_size; /* size of cursor (percentage filled) */
1170 short int cursor_visible;/* cursor visibility flag */
1171 short int cursor_x; /* position of cursor (x, y) */
1172 short int cursor_y;
1173 short int width; /* width of the screen buffer */
1174 short int height; /* height of the screen buffer */
1175 short int attr; /* default attribute */
1176 short int win_left; /* window actually displayed by renderer */
1177 short int win_top; /* the rect area is expressed withing the */
1178 short int win_right; /* boundaries of the screen buffer */
1179 short int win_bottom;
1180 short int max_width; /* maximum size (width x height) for the window */
1181 short int max_height;
1182 @END
1183 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1184 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1185 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1186 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1187 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1188 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1191 /* Get info about a console (output only) */
1192 @REQ(get_console_output_info)
1193 obj_handle_t handle; /* handle to the console */
1194 @REPLY
1195 short int cursor_size; /* size of cursor (percentage filled) */
1196 short int cursor_visible;/* cursor visibility flag */
1197 short int cursor_x; /* position of cursor (x, y) */
1198 short int cursor_y;
1199 short int width; /* width of the screen buffer */
1200 short int height; /* height of the screen buffer */
1201 short int attr; /* default attribute */
1202 short int win_left; /* window actually displayed by renderer */
1203 short int win_top; /* the rect area is expressed withing the */
1204 short int win_right; /* boundaries of the screen buffer */
1205 short int win_bottom;
1206 short int max_width; /* maximum size (width x height) for the window */
1207 short int max_height;
1208 @END
1210 /* Add input records to a console input queue */
1211 @REQ(write_console_input)
1212 obj_handle_t handle; /* handle to the console input */
1213 VARARG(rec,input_records); /* input records */
1214 @REPLY
1215 int written; /* number of records written */
1216 @END
1219 /* Fetch input records from a console input queue */
1220 @REQ(read_console_input)
1221 obj_handle_t handle; /* handle to the console input */
1222 int flush; /* flush the retrieved records from the queue? */
1223 @REPLY
1224 int read; /* number of records read */
1225 VARARG(rec,input_records); /* input records */
1226 @END
1229 /* write data (chars and/or attributes) in a screen buffer */
1230 @REQ(write_console_output)
1231 obj_handle_t handle; /* handle to the console output */
1232 int x; /* position where to start writing */
1233 int y;
1234 int mode; /* char info (see below) */
1235 int wrap; /* wrap around at end of line? */
1236 VARARG(data,bytes); /* info to write */
1237 @REPLY
1238 int written; /* number of char infos actually written */
1239 int width; /* width of screen buffer */
1240 int height; /* height of screen buffer */
1241 @END
1242 enum char_info_mode
1244 CHAR_INFO_MODE_TEXT, /* characters only */
1245 CHAR_INFO_MODE_ATTR, /* attributes only */
1246 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1247 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1251 /* fill a screen buffer with constant data (chars and/or attributes) */
1252 @REQ(fill_console_output)
1253 obj_handle_t handle; /* handle to the console output */
1254 int x; /* position where to start writing */
1255 int y;
1256 int mode; /* char info mode */
1257 int count; /* number to write */
1258 int wrap; /* wrap around at end of line? */
1259 char_info_t data; /* data to write */
1260 @REPLY
1261 int written; /* number of char infos actually written */
1262 @END
1265 /* read data (chars and/or attributes) from a screen buffer */
1266 @REQ(read_console_output)
1267 obj_handle_t handle; /* handle to the console output */
1268 int x; /* position (x,y) where to start reading */
1269 int y;
1270 int mode; /* char info mode */
1271 int wrap; /* wrap around at end of line? */
1272 @REPLY
1273 int width; /* width of screen buffer */
1274 int height; /* height of screen buffer */
1275 VARARG(data,bytes);
1276 @END
1279 /* move a rect (of data) in screen buffer content */
1280 @REQ(move_console_output)
1281 obj_handle_t handle; /* handle to the console output */
1282 short int x_src; /* position (x, y) of rect to start moving from */
1283 short int y_src;
1284 short int x_dst; /* position (x, y) of rect to move to */
1285 short int y_dst;
1286 short int w; /* size of the rect (width, height) to move */
1287 short int h;
1288 @END
1291 /* Sends a signal to a process group */
1292 @REQ(send_console_signal)
1293 int signal; /* the signal to send */
1294 process_id_t group_id; /* the group to send the signal to */
1295 @END
1298 /* enable directory change notifications */
1299 @REQ(read_directory_changes)
1300 unsigned int filter; /* notification filter */
1301 obj_handle_t handle; /* handle to the directory */
1302 int subtree; /* watch the subtree? */
1303 int want_data; /* flag indicating whether change data should be collected */
1304 async_data_t async; /* async I/O parameters */
1305 @END
1308 @REQ(read_change)
1309 obj_handle_t handle;
1310 @REPLY
1311 int action; /* type of change */
1312 VARARG(name,string); /* name of directory entry that changed */
1313 @END
1316 /* Create a file mapping */
1317 @REQ(create_mapping)
1318 unsigned int access; /* wanted access rights */
1319 unsigned int attributes; /* object attributes */
1320 file_pos_t size; /* mapping size */
1321 unsigned int protect; /* protection flags (see below) */
1322 obj_handle_t file_handle; /* file handle */
1323 VARARG(objattr,object_attributes); /* object attributes */
1324 @REPLY
1325 obj_handle_t handle; /* handle to the mapping */
1326 @END
1327 /* per-page protection flags */
1328 #define VPROT_READ 0x01
1329 #define VPROT_WRITE 0x02
1330 #define VPROT_EXEC 0x04
1331 #define VPROT_WRITECOPY 0x08
1332 #define VPROT_GUARD 0x10
1333 #define VPROT_NOCACHE 0x20
1334 #define VPROT_COMMITTED 0x40
1335 #define VPROT_WRITEWATCH 0x80
1336 /* per-mapping protection flags */
1337 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1338 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1339 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1340 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1343 /* Open a mapping */
1344 @REQ(open_mapping)
1345 unsigned int access; /* wanted access rights */
1346 unsigned int attributes; /* object attributes */
1347 obj_handle_t rootdir; /* root directory */
1348 VARARG(name,unicode_str); /* object name */
1349 @REPLY
1350 obj_handle_t handle; /* handle to the mapping */
1351 @END
1354 /* Get information about a file mapping */
1355 @REQ(get_mapping_info)
1356 obj_handle_t handle; /* handle to the mapping */
1357 unsigned int access; /* wanted access rights */
1358 @REPLY
1359 file_pos_t size; /* mapping size */
1360 int protect; /* protection flags */
1361 int header_size; /* header size (for VPROT_IMAGE mapping) */
1362 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1363 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1364 obj_handle_t shared_file; /* shared mapping file handle */
1365 @END
1368 /* Get a range of committed pages in a file mapping */
1369 @REQ(get_mapping_committed_range)
1370 obj_handle_t handle; /* handle to the mapping */
1371 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1372 @REPLY
1373 file_pos_t size; /* size of range starting at offset (page-aligned, in bytes) */
1374 int committed; /* whether it is a committed range */
1375 @END
1378 /* Add a range to the committed pages in a file mapping */
1379 @REQ(add_mapping_committed_range)
1380 obj_handle_t handle; /* handle to the mapping */
1381 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1382 file_pos_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1383 @END
1386 #define SNAP_PROCESS 0x00000001
1387 #define SNAP_THREAD 0x00000002
1388 /* Create a snapshot */
1389 @REQ(create_snapshot)
1390 unsigned int attributes; /* object attributes */
1391 unsigned int flags; /* snapshot flags (SNAP_*) */
1392 @REPLY
1393 obj_handle_t handle; /* handle to the snapshot */
1394 @END
1397 /* Get the next process from a snapshot */
1398 @REQ(next_process)
1399 obj_handle_t handle; /* handle to the snapshot */
1400 int reset; /* reset snapshot position? */
1401 @REPLY
1402 int count; /* process usage count */
1403 process_id_t pid; /* process id */
1404 process_id_t ppid; /* parent process id */
1405 int threads; /* number of threads */
1406 int priority; /* process priority */
1407 int handles; /* number of handles */
1408 VARARG(filename,unicode_str); /* file name of main exe */
1409 @END
1412 /* Get the next thread from a snapshot */
1413 @REQ(next_thread)
1414 obj_handle_t handle; /* handle to the snapshot */
1415 int reset; /* reset snapshot position? */
1416 @REPLY
1417 int count; /* thread usage count */
1418 process_id_t pid; /* process id */
1419 thread_id_t tid; /* thread id */
1420 int base_pri; /* base priority */
1421 int delta_pri; /* delta priority */
1422 @END
1425 /* Wait for a debug event */
1426 @REQ(wait_debug_event)
1427 int get_handle; /* should we alloc a handle for waiting? */
1428 @REPLY
1429 process_id_t pid; /* process id */
1430 thread_id_t tid; /* thread id */
1431 obj_handle_t wait; /* wait handle if no event ready */
1432 VARARG(event,debug_event); /* debug event data */
1433 @END
1436 /* Queue an exception event */
1437 @REQ(queue_exception_event)
1438 int first; /* first chance exception? */
1439 VARARG(record,exc_event); /* thread context followed by exception record */
1440 @REPLY
1441 obj_handle_t handle; /* handle to the queued event */
1442 @END
1445 /* Retrieve the status of an exception event */
1446 @REQ(get_exception_status)
1447 obj_handle_t handle; /* handle to the queued event */
1448 @REPLY
1449 VARARG(context,context); /* modified thread context */
1450 @END
1453 /* Send an output string to the debugger */
1454 @REQ(output_debug_string)
1455 void* string; /* string to display (in debugged process address space) */
1456 int unicode; /* is it Unicode? */
1457 int length; /* string length */
1458 @END
1461 /* Continue a debug event */
1462 @REQ(continue_debug_event)
1463 process_id_t pid; /* process id to continue */
1464 thread_id_t tid; /* thread id to continue */
1465 int status; /* continuation status */
1466 @END
1469 /* Start/stop debugging an existing process */
1470 @REQ(debug_process)
1471 process_id_t pid; /* id of the process to debug */
1472 int attach; /* 1=attaching / 0=detaching from the process */
1473 @END
1476 /* Simulate a breakpoint in a process */
1477 @REQ(debug_break)
1478 obj_handle_t handle; /* process handle */
1479 @REPLY
1480 int self; /* was it the caller itself? */
1481 @END
1484 /* Set debugger kill on exit flag */
1485 @REQ(set_debugger_kill_on_exit)
1486 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1487 @END
1490 /* Read data from a process address space */
1491 @REQ(read_process_memory)
1492 obj_handle_t handle; /* process handle */
1493 void* addr; /* addr to read from */
1494 @REPLY
1495 VARARG(data,bytes); /* result data */
1496 @END
1499 /* Write data to a process address space */
1500 @REQ(write_process_memory)
1501 obj_handle_t handle; /* process handle */
1502 void* addr; /* addr to write to */
1503 VARARG(data,bytes); /* data to write */
1504 @END
1507 /* Create a registry key */
1508 @REQ(create_key)
1509 obj_handle_t parent; /* handle to the parent key */
1510 unsigned int access; /* desired access rights */
1511 unsigned int attributes; /* object attributes */
1512 unsigned int options; /* creation options */
1513 data_size_t namelen; /* length of key name in bytes */
1514 VARARG(name,unicode_str,namelen); /* key name */
1515 VARARG(class,unicode_str); /* class name */
1516 @REPLY
1517 obj_handle_t hkey; /* handle to the created key */
1518 int created; /* has it been newly created? */
1519 @END
1521 /* Open a registry key */
1522 @REQ(open_key)
1523 obj_handle_t parent; /* handle to the parent key */
1524 unsigned int access; /* desired access rights */
1525 unsigned int attributes; /* object attributes */
1526 VARARG(name,unicode_str); /* key name */
1527 @REPLY
1528 obj_handle_t hkey; /* handle to the open key */
1529 @END
1532 /* Delete a registry key */
1533 @REQ(delete_key)
1534 obj_handle_t hkey; /* handle to the key */
1535 @END
1538 /* Flush a registry key */
1539 @REQ(flush_key)
1540 obj_handle_t hkey; /* handle to the key */
1541 @END
1544 /* Enumerate registry subkeys */
1545 @REQ(enum_key)
1546 obj_handle_t hkey; /* handle to registry key */
1547 int index; /* index of subkey (or -1 for current key) */
1548 int info_class; /* requested information class */
1549 @REPLY
1550 int subkeys; /* number of subkeys */
1551 int max_subkey; /* longest subkey name */
1552 int max_class; /* longest class name */
1553 int values; /* number of values */
1554 int max_value; /* longest value name */
1555 int max_data; /* longest value data */
1556 timeout_t modif; /* last modification time */
1557 data_size_t total; /* total length needed for full name and class */
1558 data_size_t namelen; /* length of key name in bytes */
1559 VARARG(name,unicode_str,namelen); /* key name */
1560 VARARG(class,unicode_str); /* class name */
1561 @END
1564 /* Set a value of a registry key */
1565 @REQ(set_key_value)
1566 obj_handle_t hkey; /* handle to registry key */
1567 int type; /* value type */
1568 data_size_t namelen; /* length of value name in bytes */
1569 VARARG(name,unicode_str,namelen); /* value name */
1570 VARARG(data,bytes); /* value data */
1571 @END
1574 /* Retrieve the value of a registry key */
1575 @REQ(get_key_value)
1576 obj_handle_t hkey; /* handle to registry key */
1577 VARARG(name,unicode_str); /* value name */
1578 @REPLY
1579 int type; /* value type */
1580 data_size_t total; /* total length needed for data */
1581 VARARG(data,bytes); /* value data */
1582 @END
1585 /* Enumerate a value of a registry key */
1586 @REQ(enum_key_value)
1587 obj_handle_t hkey; /* handle to registry key */
1588 int index; /* value index */
1589 int info_class; /* requested information class */
1590 @REPLY
1591 int type; /* value type */
1592 data_size_t total; /* total length needed for full name and data */
1593 data_size_t namelen; /* length of value name in bytes */
1594 VARARG(name,unicode_str,namelen); /* value name */
1595 VARARG(data,bytes); /* value data */
1596 @END
1599 /* Delete a value of a registry key */
1600 @REQ(delete_key_value)
1601 obj_handle_t hkey; /* handle to registry key */
1602 VARARG(name,unicode_str); /* value name */
1603 @END
1606 /* Load a registry branch from a file */
1607 @REQ(load_registry)
1608 obj_handle_t hkey; /* root key to load to */
1609 obj_handle_t file; /* file to load from */
1610 VARARG(name,unicode_str); /* subkey name */
1611 @END
1614 /* UnLoad a registry branch from a file */
1615 @REQ(unload_registry)
1616 obj_handle_t hkey; /* root key to unload to */
1617 @END
1620 /* Save a registry branch to a file */
1621 @REQ(save_registry)
1622 obj_handle_t hkey; /* key to save */
1623 obj_handle_t file; /* file to save to */
1624 @END
1627 /* Add a registry key change notification */
1628 @REQ(set_registry_notification)
1629 obj_handle_t hkey; /* key to watch for changes */
1630 obj_handle_t event; /* event to set */
1631 int subtree; /* should we watch the whole subtree? */
1632 unsigned int filter; /* things to watch */
1633 @END
1636 /* Create a waitable timer */
1637 @REQ(create_timer)
1638 unsigned int access; /* wanted access rights */
1639 unsigned int attributes; /* object attributes */
1640 obj_handle_t rootdir; /* root directory */
1641 int manual; /* manual reset */
1642 VARARG(name,unicode_str); /* object name */
1643 @REPLY
1644 obj_handle_t handle; /* handle to the timer */
1645 @END
1648 /* Open a waitable timer */
1649 @REQ(open_timer)
1650 unsigned int access; /* wanted access rights */
1651 unsigned int attributes; /* object attributes */
1652 obj_handle_t rootdir; /* root directory */
1653 VARARG(name,unicode_str); /* object name */
1654 @REPLY
1655 obj_handle_t handle; /* handle to the timer */
1656 @END
1658 /* Set a waitable timer */
1659 @REQ(set_timer)
1660 obj_handle_t handle; /* handle to the timer */
1661 timeout_t expire; /* next expiration absolute time */
1662 int period; /* timer period in ms */
1663 void* callback; /* callback function */
1664 void* arg; /* callback argument */
1665 @REPLY
1666 int signaled; /* was the timer signaled before this call ? */
1667 @END
1669 /* Cancel a waitable timer */
1670 @REQ(cancel_timer)
1671 obj_handle_t handle; /* handle to the timer */
1672 @REPLY
1673 int signaled; /* was the timer signaled before this calltime ? */
1674 @END
1676 /* Get information on a waitable timer */
1677 @REQ(get_timer_info)
1678 obj_handle_t handle; /* handle to the timer */
1679 @REPLY
1680 timeout_t when; /* absolute time when the timer next expires */
1681 int signaled; /* is the timer signaled? */
1682 @END
1685 /* Retrieve the current context of a thread */
1686 @REQ(get_thread_context)
1687 obj_handle_t handle; /* thread handle */
1688 unsigned int flags; /* context flags */
1689 int suspend; /* if getting context during suspend */
1690 @REPLY
1691 int self; /* was it a handle to the current thread? */
1692 VARARG(context,context); /* thread context */
1693 @END
1696 /* Set the current context of a thread */
1697 @REQ(set_thread_context)
1698 obj_handle_t handle; /* thread handle */
1699 unsigned int flags; /* context flags */
1700 int suspend; /* if setting context during suspend */
1701 VARARG(context,context); /* thread context */
1702 @REPLY
1703 int self; /* was it a handle to the current thread? */
1704 @END
1707 /* Fetch a selector entry for a thread */
1708 @REQ(get_selector_entry)
1709 obj_handle_t handle; /* thread handle */
1710 int entry; /* LDT entry */
1711 @REPLY
1712 unsigned int base; /* selector base */
1713 unsigned int limit; /* selector limit */
1714 unsigned char flags; /* selector flags */
1715 @END
1718 /* Add an atom */
1719 @REQ(add_atom)
1720 obj_handle_t table; /* which table to add atom to */
1721 VARARG(name,unicode_str); /* atom name */
1722 @REPLY
1723 atom_t atom; /* resulting atom */
1724 @END
1727 /* Delete an atom */
1728 @REQ(delete_atom)
1729 obj_handle_t table; /* which table to delete atom from */
1730 atom_t atom; /* atom handle */
1731 @END
1734 /* Find an atom */
1735 @REQ(find_atom)
1736 obj_handle_t table; /* which table to find atom from */
1737 VARARG(name,unicode_str); /* atom name */
1738 @REPLY
1739 atom_t atom; /* atom handle */
1740 @END
1743 /* Get information about an atom */
1744 @REQ(get_atom_information)
1745 obj_handle_t table; /* which table to find atom from */
1746 atom_t atom; /* atom handle */
1747 @REPLY
1748 int count; /* atom lock count */
1749 int pinned; /* whether the atom has been pinned */
1750 data_size_t total; /* actual length of atom name */
1751 VARARG(name,unicode_str); /* atom name */
1752 @END
1755 /* Set information about an atom */
1756 @REQ(set_atom_information)
1757 obj_handle_t table; /* which table to find atom from */
1758 atom_t atom; /* atom handle */
1759 int pinned; /* whether to bump atom information */
1760 @END
1763 /* Empty an atom table */
1764 @REQ(empty_atom_table)
1765 obj_handle_t table; /* which table to find atom from */
1766 int if_pinned; /* whether to delete pinned atoms */
1767 @END
1770 /* Init an atom table */
1771 @REQ(init_atom_table)
1772 int entries; /* number of entries (only for local) */
1773 @REPLY
1774 obj_handle_t table; /* handle to the atom table */
1775 @END
1778 /* Get the message queue of the current thread */
1779 @REQ(get_msg_queue)
1780 @REPLY
1781 obj_handle_t handle; /* handle to the queue */
1782 @END
1785 /* Set the file descriptor associated to the current thread queue */
1786 @REQ(set_queue_fd)
1787 obj_handle_t handle; /* handle to the file descriptor */
1788 @END
1791 /* Set the current message queue wakeup mask */
1792 @REQ(set_queue_mask)
1793 unsigned int wake_mask; /* wakeup bits mask */
1794 unsigned int changed_mask; /* changed bits mask */
1795 int skip_wait; /* will we skip waiting if signaled? */
1796 @REPLY
1797 unsigned int wake_bits; /* current wake bits */
1798 unsigned int changed_bits; /* current changed bits */
1799 @END
1802 /* Get the current message queue status */
1803 @REQ(get_queue_status)
1804 int clear; /* should we clear the change bits? */
1805 @REPLY
1806 unsigned int wake_bits; /* wake bits */
1807 unsigned int changed_bits; /* changed bits since last time */
1808 @END
1811 /* Retrieve the process idle event */
1812 @REQ(get_process_idle_event)
1813 obj_handle_t handle; /* process handle */
1814 @REPLY
1815 obj_handle_t event; /* handle to idle event */
1816 @END
1819 /* Send a message to a thread queue */
1820 @REQ(send_message)
1821 thread_id_t id; /* thread id */
1822 int type; /* message type (see below) */
1823 int flags; /* message flags (see below) */
1824 user_handle_t win; /* window handle */
1825 unsigned int msg; /* message code */
1826 lparam_t wparam; /* parameters */
1827 lparam_t lparam; /* parameters */
1828 timeout_t timeout; /* timeout for reply */
1829 VARARG(data,message_data); /* message data for sent messages */
1830 @END
1832 @REQ(post_quit_message)
1833 int exit_code; /* exit code to return */
1834 @END
1836 enum message_type
1838 MSG_ASCII, /* Ascii message (from SendMessageA) */
1839 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1840 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1841 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1842 MSG_CALLBACK_RESULT,/* result of a callback message */
1843 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1844 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1845 MSG_HARDWARE, /* hardware message */
1846 MSG_WINEVENT /* winevent message */
1848 #define SEND_MSG_ABORT_IF_HUNG 0x01
1851 /* Send a hardware message to a thread queue */
1852 @REQ(send_hardware_message)
1853 thread_id_t id; /* thread id */
1854 user_handle_t win; /* window handle */
1855 unsigned int msg; /* message code */
1856 unsigned int time; /* message time */
1857 lparam_t wparam; /* parameters */
1858 lparam_t lparam; /* parameters */
1859 lparam_t info; /* extra info */
1860 int x; /* x position */
1861 int y; /* y position */
1862 @END
1865 /* Get a message from the current queue */
1866 @REQ(get_message)
1867 unsigned int flags; /* PM_* flags */
1868 user_handle_t get_win; /* window handle to get */
1869 unsigned int get_first; /* first message code to get */
1870 unsigned int get_last; /* last message code to get */
1871 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1872 unsigned int wake_mask; /* wakeup bits mask */
1873 unsigned int changed_mask; /* changed bits mask */
1874 @REPLY
1875 user_handle_t win; /* window handle */
1876 int type; /* message type */
1877 unsigned int msg; /* message code */
1878 lparam_t wparam; /* parameters */
1879 lparam_t lparam; /* parameters */
1880 lparam_t info; /* extra info */
1881 int x; /* x position */
1882 int y; /* y position */
1883 unsigned int time; /* message time */
1884 unsigned int hw_id; /* id if hardware message */
1885 unsigned int active_hooks; /* active hooks bitmap */
1886 data_size_t total; /* total size of extra data */
1887 VARARG(data,message_data); /* message data for sent messages */
1888 @END
1891 /* Reply to a sent message */
1892 @REQ(reply_message)
1893 lparam_t result; /* message result */
1894 int remove; /* should we remove the message? */
1895 VARARG(data,bytes); /* message data for sent messages */
1896 @END
1899 /* Accept the current hardware message */
1900 @REQ(accept_hardware_message)
1901 unsigned int hw_id; /* id of the hardware message */
1902 int remove; /* should we remove the message? */
1903 user_handle_t new_win; /* new destination window for current message */
1904 @END
1907 /* Retrieve the reply for the last message sent */
1908 @REQ(get_message_reply)
1909 int cancel; /* cancel message if not ready? */
1910 @REPLY
1911 lparam_t result; /* message result */
1912 VARARG(data,bytes); /* message data for sent messages */
1913 @END
1916 /* Set a window timer */
1917 @REQ(set_win_timer)
1918 user_handle_t win; /* window handle */
1919 unsigned int msg; /* message to post */
1920 unsigned int rate; /* timer rate in ms */
1921 lparam_t id; /* timer id */
1922 lparam_t lparam; /* message lparam (callback proc) */
1923 @REPLY
1924 lparam_t id; /* timer id */
1925 @END
1928 /* Kill a window timer */
1929 @REQ(kill_win_timer)
1930 user_handle_t win; /* window handle */
1931 unsigned int msg; /* message to post */
1932 lparam_t id; /* timer id */
1933 @END
1936 /* check if the thread owning the window is hung */
1937 @REQ(is_window_hung)
1938 user_handle_t win; /* window handle */
1939 @REPLY
1940 int is_hung;
1941 @END
1944 /* Retrieve info about a serial port */
1945 @REQ(get_serial_info)
1946 obj_handle_t handle; /* handle to comm port */
1947 @REPLY
1948 unsigned int readinterval;
1949 unsigned int readconst;
1950 unsigned int readmult;
1951 unsigned int writeconst;
1952 unsigned int writemult;
1953 unsigned int eventmask;
1954 @END
1957 /* Set info about a serial port */
1958 @REQ(set_serial_info)
1959 obj_handle_t handle; /* handle to comm port */
1960 int flags; /* bitmask to set values (see below) */
1961 unsigned int readinterval;
1962 unsigned int readconst;
1963 unsigned int readmult;
1964 unsigned int writeconst;
1965 unsigned int writemult;
1966 unsigned int eventmask;
1967 @END
1968 #define SERIALINFO_SET_TIMEOUTS 0x01
1969 #define SERIALINFO_SET_MASK 0x02
1972 /* Create an async I/O */
1973 @REQ(register_async)
1974 obj_handle_t handle; /* handle to comm port, socket or file */
1975 int type; /* type of queue to look after */
1976 int count; /* count - usually # of bytes to be read/written */
1977 async_data_t async; /* async I/O parameters */
1978 @END
1979 #define ASYNC_TYPE_READ 0x01
1980 #define ASYNC_TYPE_WRITE 0x02
1981 #define ASYNC_TYPE_WAIT 0x03
1984 /* Cancel all async op on a fd */
1985 @REQ(cancel_async)
1986 obj_handle_t handle; /* handle to comm port, socket or file */
1987 @END
1990 /* Perform an ioctl on a file */
1991 @REQ(ioctl)
1992 obj_handle_t handle; /* handle to the device */
1993 ioctl_code_t code; /* ioctl code */
1994 async_data_t async; /* async I/O parameters */
1995 VARARG(in_data,bytes); /* ioctl input data */
1996 @REPLY
1997 obj_handle_t wait; /* handle to wait on for blocking ioctl */
1998 unsigned int options; /* device open options */
1999 VARARG(out_data,bytes); /* ioctl output data */
2000 @END
2003 /* Retrieve results of an async ioctl */
2004 @REQ(get_ioctl_result)
2005 obj_handle_t handle; /* handle to the device */
2006 void* user_arg; /* user arg used to identify the request */
2007 @REPLY
2008 VARARG(out_data,bytes); /* ioctl output data */
2009 @END
2012 /* Create a named pipe */
2013 @REQ(create_named_pipe)
2014 unsigned int access;
2015 unsigned int attributes; /* object attributes */
2016 obj_handle_t rootdir; /* root directory */
2017 unsigned int options;
2018 unsigned int flags;
2019 unsigned int maxinstances;
2020 unsigned int outsize;
2021 unsigned int insize;
2022 timeout_t timeout;
2023 VARARG(name,unicode_str); /* pipe name */
2024 @REPLY
2025 obj_handle_t handle; /* handle to the pipe */
2026 @END
2028 /* flags in create_named_pipe and get_named_pipe_info */
2029 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2030 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2031 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2032 #define NAMED_PIPE_SERVER_END 0x8000
2035 @REQ(get_named_pipe_info)
2036 obj_handle_t handle;
2037 @REPLY
2038 unsigned int flags;
2039 unsigned int maxinstances;
2040 unsigned int instances;
2041 unsigned int outsize;
2042 unsigned int insize;
2043 @END
2046 /* Create a window */
2047 @REQ(create_window)
2048 user_handle_t parent; /* parent window */
2049 user_handle_t owner; /* owner window */
2050 atom_t atom; /* class atom */
2051 void* instance; /* module instance */
2052 VARARG(class,unicode_str); /* class name */
2053 @REPLY
2054 user_handle_t handle; /* created window */
2055 user_handle_t parent; /* full handle of parent */
2056 user_handle_t owner; /* full handle of owner */
2057 int extra; /* number of extra bytes */
2058 void* class_ptr; /* pointer to class in client address space */
2059 @END
2062 /* Destroy a window */
2063 @REQ(destroy_window)
2064 user_handle_t handle; /* handle to the window */
2065 @END
2068 /* Retrieve the desktop window for the current thread */
2069 @REQ(get_desktop_window)
2070 int force; /* force creation if it doesn't exist */
2071 @REPLY
2072 user_handle_t top_window; /* handle to the desktop window */
2073 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2074 @END
2077 /* Set a window owner */
2078 @REQ(set_window_owner)
2079 user_handle_t handle; /* handle to the window */
2080 user_handle_t owner; /* new owner */
2081 @REPLY
2082 user_handle_t full_owner; /* full handle of new owner */
2083 user_handle_t prev_owner; /* full handle of previous owner */
2084 @END
2087 /* Get information from a window handle */
2088 @REQ(get_window_info)
2089 user_handle_t handle; /* handle to the window */
2090 @REPLY
2091 user_handle_t full_handle; /* full 32-bit handle */
2092 user_handle_t last_active; /* last active popup */
2093 process_id_t pid; /* process owning the window */
2094 thread_id_t tid; /* thread owning the window */
2095 atom_t atom; /* class atom */
2096 int is_unicode; /* ANSI or unicode */
2097 @END
2100 /* Set some information in a window */
2101 @REQ(set_window_info)
2102 unsigned int flags; /* flags for fields to set (see below) */
2103 user_handle_t handle; /* handle to the window */
2104 unsigned int style; /* window style */
2105 unsigned int ex_style; /* window extended style */
2106 unsigned int id; /* window id */
2107 int is_unicode; /* ANSI or unicode */
2108 void* instance; /* creator instance */
2109 lparam_t user_data; /* user-specific data */
2110 int extra_offset; /* offset to set in extra bytes */
2111 data_size_t extra_size; /* size to set in extra bytes */
2112 lparam_t extra_value; /* value to set in extra bytes */
2113 @REPLY
2114 unsigned int old_style; /* old window style */
2115 unsigned int old_ex_style; /* old window extended style */
2116 unsigned int old_id; /* old window id */
2117 void* old_instance; /* old creator instance */
2118 lparam_t old_user_data; /* old user-specific data */
2119 lparam_t old_extra_value; /* old value in extra bytes */
2120 @END
2121 #define SET_WIN_STYLE 0x01
2122 #define SET_WIN_EXSTYLE 0x02
2123 #define SET_WIN_ID 0x04
2124 #define SET_WIN_INSTANCE 0x08
2125 #define SET_WIN_USERDATA 0x10
2126 #define SET_WIN_EXTRA 0x20
2127 #define SET_WIN_UNICODE 0x40
2130 /* Set the parent of a window */
2131 @REQ(set_parent)
2132 user_handle_t handle; /* handle to the window */
2133 user_handle_t parent; /* handle to the parent */
2134 @REPLY
2135 user_handle_t old_parent; /* old parent window */
2136 user_handle_t full_parent; /* full handle of new parent */
2137 @END
2140 /* Get a list of the window parents, up to the root of the tree */
2141 @REQ(get_window_parents)
2142 user_handle_t handle; /* handle to the window */
2143 @REPLY
2144 int count; /* total count of parents */
2145 VARARG(parents,user_handles); /* parent handles */
2146 @END
2149 /* Get a list of the window children */
2150 @REQ(get_window_children)
2151 obj_handle_t desktop; /* handle to desktop */
2152 user_handle_t parent; /* parent window */
2153 atom_t atom; /* class atom for the listed children */
2154 thread_id_t tid; /* thread owning the listed children */
2155 VARARG(class,unicode_str); /* class name */
2156 @REPLY
2157 int count; /* total count of children */
2158 VARARG(children,user_handles); /* children handles */
2159 @END
2162 /* Get a list of the window children that contain a given point */
2163 @REQ(get_window_children_from_point)
2164 user_handle_t parent; /* parent window */
2165 int x; /* point in parent coordinates */
2166 int y;
2167 @REPLY
2168 int count; /* total count of children */
2169 VARARG(children,user_handles); /* children handles */
2170 @END
2173 /* Get window tree information from a window handle */
2174 @REQ(get_window_tree)
2175 user_handle_t handle; /* handle to the window */
2176 @REPLY
2177 user_handle_t parent; /* parent window */
2178 user_handle_t owner; /* owner window */
2179 user_handle_t next_sibling; /* next sibling in Z-order */
2180 user_handle_t prev_sibling; /* prev sibling in Z-order */
2181 user_handle_t first_sibling; /* first sibling in Z-order */
2182 user_handle_t last_sibling; /* last sibling in Z-order */
2183 user_handle_t first_child; /* first child */
2184 user_handle_t last_child; /* last child */
2185 @END
2187 /* Set the position and Z order of a window */
2188 @REQ(set_window_pos)
2189 unsigned int flags; /* SWP_* flags */
2190 user_handle_t handle; /* handle to the window */
2191 user_handle_t previous; /* previous window in Z order */
2192 rectangle_t window; /* window rectangle */
2193 rectangle_t client; /* client rectangle */
2194 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2195 @REPLY
2196 unsigned int new_style; /* new window style */
2197 unsigned int new_ex_style; /* new window extended style */
2198 @END
2201 /* Get the window and client rectangles of a window */
2202 @REQ(get_window_rectangles)
2203 user_handle_t handle; /* handle to the window */
2204 @REPLY
2205 rectangle_t window; /* window rectangle */
2206 rectangle_t visible; /* visible part of the window rectangle */
2207 rectangle_t client; /* client rectangle */
2208 @END
2211 /* Get the window text */
2212 @REQ(get_window_text)
2213 user_handle_t handle; /* handle to the window */
2214 @REPLY
2215 VARARG(text,unicode_str); /* window text */
2216 @END
2219 /* Set the window text */
2220 @REQ(set_window_text)
2221 user_handle_t handle; /* handle to the window */
2222 VARARG(text,unicode_str); /* window text */
2223 @END
2226 /* Get the coordinates offset between two windows */
2227 @REQ(get_windows_offset)
2228 user_handle_t from; /* handle to the first window */
2229 user_handle_t to; /* handle to the second window */
2230 @REPLY
2231 int x; /* x coordinate offset */
2232 int y; /* y coordinate offset */
2233 @END
2236 /* Get the visible region of a window */
2237 @REQ(get_visible_region)
2238 user_handle_t window; /* handle to the window */
2239 unsigned int flags; /* DCX flags */
2240 @REPLY
2241 user_handle_t top_win; /* top window to clip against */
2242 rectangle_t top_rect; /* top window visible rect with screen coords */
2243 rectangle_t win_rect; /* window rect in screen coords */
2244 data_size_t total_size; /* total size of the resulting region */
2245 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2246 @END
2249 /* Get the window region */
2250 @REQ(get_window_region)
2251 user_handle_t window; /* handle to the window */
2252 @REPLY
2253 data_size_t total_size; /* total size of the resulting region */
2254 VARARG(region,rectangles); /* list of rectangles for the region */
2255 @END
2258 /* Set the window region */
2259 @REQ(set_window_region)
2260 user_handle_t window; /* handle to the window */
2261 int redraw; /* redraw the window? */
2262 VARARG(region,rectangles); /* list of rectangles for the region */
2263 @END
2266 /* Get the window update region */
2267 @REQ(get_update_region)
2268 user_handle_t window; /* handle to the window */
2269 user_handle_t from_child; /* child to start searching from */
2270 unsigned int flags; /* update flags (see below) */
2271 @REPLY
2272 user_handle_t child; /* child to repaint (or window itself) */
2273 unsigned int flags; /* resulting update flags (see below) */
2274 data_size_t total_size; /* total size of the resulting region */
2275 VARARG(region,rectangles); /* list of rectangles for the region */
2276 @END
2277 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2278 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2279 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2280 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2281 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2282 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2283 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2284 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2287 /* Update the z order of a window so that a given rectangle is fully visible */
2288 @REQ(update_window_zorder)
2289 user_handle_t window; /* handle to the window */
2290 rectangle_t rect; /* rectangle that must be visible */
2291 @END
2294 /* Mark parts of a window as needing a redraw */
2295 @REQ(redraw_window)
2296 user_handle_t window; /* handle to the window */
2297 unsigned int flags; /* RDW_* flags */
2298 VARARG(region,rectangles); /* list of rectangles for the region */
2299 @END
2302 /* Set a window property */
2303 @REQ(set_window_property)
2304 user_handle_t window; /* handle to the window */
2305 atom_t atom; /* property atom (if no name specified) */
2306 lparam_t data; /* data to store */
2307 VARARG(name,unicode_str); /* property name */
2308 @END
2311 /* Remove a window property */
2312 @REQ(remove_window_property)
2313 user_handle_t window; /* handle to the window */
2314 atom_t atom; /* property atom (if no name specified) */
2315 VARARG(name,unicode_str); /* property name */
2316 @REPLY
2317 lparam_t data; /* data stored in property */
2318 @END
2321 /* Get a window property */
2322 @REQ(get_window_property)
2323 user_handle_t window; /* handle to the window */
2324 atom_t atom; /* property atom (if no name specified) */
2325 VARARG(name,unicode_str); /* property name */
2326 @REPLY
2327 lparam_t data; /* data stored in property */
2328 @END
2331 /* Get the list of properties of a window */
2332 @REQ(get_window_properties)
2333 user_handle_t window; /* handle to the window */
2334 @REPLY
2335 int total; /* total number of properties */
2336 VARARG(props,properties); /* list of properties */
2337 @END
2340 /* Create a window station */
2341 @REQ(create_winstation)
2342 unsigned int flags; /* window station flags */
2343 unsigned int access; /* wanted access rights */
2344 unsigned int attributes; /* object attributes */
2345 VARARG(name,unicode_str); /* object name */
2346 @REPLY
2347 obj_handle_t handle; /* handle to the window station */
2348 @END
2351 /* Open a handle to a window station */
2352 @REQ(open_winstation)
2353 unsigned int access; /* wanted access rights */
2354 unsigned int attributes; /* object attributes */
2355 VARARG(name,unicode_str); /* object name */
2356 @REPLY
2357 obj_handle_t handle; /* handle to the window station */
2358 @END
2361 /* Close a window station */
2362 @REQ(close_winstation)
2363 obj_handle_t handle; /* handle to the window station */
2364 @END
2367 /* Get the process current window station */
2368 @REQ(get_process_winstation)
2369 @REPLY
2370 obj_handle_t handle; /* handle to the window station */
2371 @END
2374 /* Set the process current window station */
2375 @REQ(set_process_winstation)
2376 obj_handle_t handle; /* handle to the window station */
2377 @END
2380 /* Enumerate window stations */
2381 @REQ(enum_winstation)
2382 unsigned int index; /* current index */
2383 @REPLY
2384 unsigned int next; /* next index */
2385 VARARG(name,unicode_str); /* window station name */
2386 @END
2389 /* Create a desktop */
2390 @REQ(create_desktop)
2391 unsigned int flags; /* desktop flags */
2392 unsigned int access; /* wanted access rights */
2393 unsigned int attributes; /* object attributes */
2394 VARARG(name,unicode_str); /* object name */
2395 @REPLY
2396 obj_handle_t handle; /* handle to the desktop */
2397 @END
2400 /* Open a handle to a desktop */
2401 @REQ(open_desktop)
2402 obj_handle_t winsta; /* window station to open (null allowed) */
2403 unsigned int flags; /* desktop flags */
2404 unsigned int access; /* wanted access rights */
2405 unsigned int attributes; /* object attributes */
2406 VARARG(name,unicode_str); /* object name */
2407 @REPLY
2408 obj_handle_t handle; /* handle to the desktop */
2409 @END
2412 /* Close a desktop */
2413 @REQ(close_desktop)
2414 obj_handle_t handle; /* handle to the desktop */
2415 @END
2418 /* Get the thread current desktop */
2419 @REQ(get_thread_desktop)
2420 thread_id_t tid; /* thread id */
2421 @REPLY
2422 obj_handle_t handle; /* handle to the desktop */
2423 @END
2426 /* Set the thread current desktop */
2427 @REQ(set_thread_desktop)
2428 obj_handle_t handle; /* handle to the desktop */
2429 @END
2432 /* Enumerate desktops */
2433 @REQ(enum_desktop)
2434 obj_handle_t winstation; /* handle to the window station */
2435 unsigned int index; /* current index */
2436 @REPLY
2437 unsigned int next; /* next index */
2438 VARARG(name,unicode_str); /* window station name */
2439 @END
2442 /* Get/set information about a user object (window station or desktop) */
2443 @REQ(set_user_object_info)
2444 obj_handle_t handle; /* handle to the object */
2445 unsigned int flags; /* information to set */
2446 unsigned int obj_flags; /* new object flags */
2447 @REPLY
2448 int is_desktop; /* is object a desktop? */
2449 unsigned int old_obj_flags; /* old object flags */
2450 VARARG(name,unicode_str); /* object name */
2451 @END
2452 #define SET_USER_OBJECT_FLAGS 1
2455 /* Attach (or detach) thread inputs */
2456 @REQ(attach_thread_input)
2457 thread_id_t tid_from; /* thread to be attached */
2458 thread_id_t tid_to; /* thread to which tid_from should be attached */
2459 int attach; /* is it an attach? */
2460 @END
2463 /* Get input data for a given thread */
2464 @REQ(get_thread_input)
2465 thread_id_t tid; /* id of thread */
2466 @REPLY
2467 user_handle_t focus; /* handle to the focus window */
2468 user_handle_t capture; /* handle to the capture window */
2469 user_handle_t active; /* handle to the active window */
2470 user_handle_t foreground; /* handle to the global foreground window */
2471 user_handle_t menu_owner; /* handle to the menu owner */
2472 user_handle_t move_size; /* handle to the moving/resizing window */
2473 user_handle_t caret; /* handle to the caret window */
2474 rectangle_t rect; /* caret rectangle */
2475 @END
2478 /* Get the time of the last input event */
2479 @REQ(get_last_input_time)
2480 @REPLY
2481 unsigned int time;
2482 @END
2485 /* Retrieve queue keyboard state for a given thread */
2486 @REQ(get_key_state)
2487 thread_id_t tid; /* id of thread */
2488 int key; /* optional key code or -1 */
2489 @REPLY
2490 unsigned char state; /* state of specified key */
2491 VARARG(keystate,bytes); /* state array for all the keys */
2492 @END
2494 /* Set queue keyboard state for a given thread */
2495 @REQ(set_key_state)
2496 thread_id_t tid; /* id of thread */
2497 VARARG(keystate,bytes); /* state array for all the keys */
2498 @END
2500 /* Set the system foreground window */
2501 @REQ(set_foreground_window)
2502 user_handle_t handle; /* handle to the foreground window */
2503 @REPLY
2504 user_handle_t previous; /* handle to the previous foreground window */
2505 int send_msg_old; /* whether we have to send a msg to the old window */
2506 int send_msg_new; /* whether we have to send a msg to the new window */
2507 @END
2509 /* Set the current thread focus window */
2510 @REQ(set_focus_window)
2511 user_handle_t handle; /* handle to the focus window */
2512 @REPLY
2513 user_handle_t previous; /* handle to the previous focus window */
2514 @END
2516 /* Set the current thread active window */
2517 @REQ(set_active_window)
2518 user_handle_t handle; /* handle to the active window */
2519 @REPLY
2520 user_handle_t previous; /* handle to the previous active window */
2521 @END
2523 /* Set the current thread capture window */
2524 @REQ(set_capture_window)
2525 user_handle_t handle; /* handle to the capture window */
2526 unsigned int flags; /* capture flags (see below) */
2527 @REPLY
2528 user_handle_t previous; /* handle to the previous capture window */
2529 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2530 @END
2531 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2532 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2535 /* Set the current thread caret window */
2536 @REQ(set_caret_window)
2537 user_handle_t handle; /* handle to the caret window */
2538 int width; /* caret width */
2539 int height; /* caret height */
2540 @REPLY
2541 user_handle_t previous; /* handle to the previous caret window */
2542 rectangle_t old_rect; /* previous caret rectangle */
2543 int old_hide; /* previous hide count */
2544 int old_state; /* previous caret state (1=on, 0=off) */
2545 @END
2548 /* Set the current thread caret information */
2549 @REQ(set_caret_info)
2550 unsigned int flags; /* caret flags (see below) */
2551 user_handle_t handle; /* handle to the caret window */
2552 int x; /* caret x position */
2553 int y; /* caret y position */
2554 int hide; /* increment for hide count (can be negative to show it) */
2555 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2556 @REPLY
2557 user_handle_t full_handle; /* handle to the current caret window */
2558 rectangle_t old_rect; /* previous caret rectangle */
2559 int old_hide; /* previous hide count */
2560 int old_state; /* previous caret state (1=on, 0=off) */
2561 @END
2562 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2563 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2564 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2567 /* Set a window hook */
2568 @REQ(set_hook)
2569 int id; /* id of the hook */
2570 process_id_t pid; /* id of process to set the hook into */
2571 thread_id_t tid; /* id of thread to set the hook into */
2572 int event_min;
2573 int event_max;
2574 int flags;
2575 void* proc; /* hook procedure */
2576 int unicode; /* is it a unicode hook? */
2577 VARARG(module,unicode_str); /* module name */
2578 @REPLY
2579 user_handle_t handle; /* handle to the hook */
2580 unsigned int active_hooks; /* active hooks bitmap */
2581 @END
2584 /* Remove a window hook */
2585 @REQ(remove_hook)
2586 user_handle_t handle; /* handle to the hook */
2587 int id; /* id of the hook if handle is 0 */
2588 void* proc; /* hook procedure if handle is 0 */
2589 @REPLY
2590 unsigned int active_hooks; /* active hooks bitmap */
2591 @END
2594 /* Start calling a hook chain */
2595 @REQ(start_hook_chain)
2596 int id; /* id of the hook */
2597 int event; /* signalled event */
2598 user_handle_t window; /* handle to the event window */
2599 int object_id; /* object id for out of context winevent */
2600 int child_id; /* child id for out of context winevent */
2601 @REPLY
2602 user_handle_t handle; /* handle to the next hook */
2603 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2604 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2605 void* proc; /* hook procedure */
2606 int unicode; /* is it a unicode hook? */
2607 unsigned int active_hooks; /* active hooks bitmap */
2608 VARARG(module,unicode_str); /* module name */
2609 @END
2612 /* Finished calling a hook chain */
2613 @REQ(finish_hook_chain)
2614 int id; /* id of the hook */
2615 @END
2618 /* Get the hook information */
2619 @REQ(get_hook_info)
2620 user_handle_t handle; /* handle to the current hook */
2621 int get_next; /* do we want info about current or next hook? */
2622 int event; /* signalled event */
2623 user_handle_t window; /* handle to the event window */
2624 int object_id; /* object id for out of context winevent */
2625 int child_id; /* child id for out of context winevent */
2626 @REPLY
2627 user_handle_t handle; /* handle to the hook */
2628 int id; /* id of the hook */
2629 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2630 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2631 void* proc; /* hook procedure */
2632 int unicode; /* is it a unicode hook? */
2633 VARARG(module,unicode_str); /* module name */
2634 @END
2637 /* Create a window class */
2638 @REQ(create_class)
2639 int local; /* is it a local class? */
2640 atom_t atom; /* class atom */
2641 unsigned int style; /* class style */
2642 void* instance; /* module instance */
2643 int extra; /* number of extra class bytes */
2644 int win_extra; /* number of window extra bytes */
2645 void* client_ptr; /* pointer to class in client address space */
2646 VARARG(name,unicode_str); /* class name */
2647 @REPLY
2648 atom_t atom; /* resulting class atom */
2649 @END
2652 /* Destroy a window class */
2653 @REQ(destroy_class)
2654 atom_t atom; /* class atom */
2655 void* instance; /* module instance */
2656 VARARG(name,unicode_str); /* class name */
2657 @REPLY
2658 void* client_ptr; /* pointer to class in client address space */
2659 @END
2662 /* Set some information in a class */
2663 @REQ(set_class_info)
2664 user_handle_t window; /* handle to the window */
2665 unsigned int flags; /* flags for info to set (see below) */
2666 atom_t atom; /* class atom */
2667 unsigned int style; /* class style */
2668 int win_extra; /* number of window extra bytes */
2669 void* instance; /* module instance */
2670 int extra_offset; /* offset to set in extra bytes */
2671 data_size_t extra_size; /* size to set in extra bytes */
2672 lparam_t extra_value; /* value to set in extra bytes */
2673 @REPLY
2674 atom_t old_atom; /* previous class atom */
2675 unsigned int old_style; /* previous class style */
2676 int old_extra; /* previous number of class extra bytes */
2677 int old_win_extra; /* previous number of window extra bytes */
2678 void* old_instance; /* previous module instance */
2679 lparam_t old_extra_value; /* old value in extra bytes */
2680 @END
2681 #define SET_CLASS_ATOM 0x0001
2682 #define SET_CLASS_STYLE 0x0002
2683 #define SET_CLASS_WINEXTRA 0x0004
2684 #define SET_CLASS_INSTANCE 0x0008
2685 #define SET_CLASS_EXTRA 0x0010
2688 /* Set/get clipboard information */
2689 @REQ(set_clipboard_info)
2690 unsigned int flags; /* flags for fields to set (see below) */
2691 user_handle_t clipboard; /* clipboard window */
2692 user_handle_t owner; /* clipboard owner */
2693 user_handle_t viewer; /* first clipboard viewer */
2694 unsigned int seqno; /* change sequence number */
2695 @REPLY
2696 unsigned int flags; /* status flags (see below) */
2697 user_handle_t old_clipboard; /* old clipboard window */
2698 user_handle_t old_owner; /* old clipboard owner */
2699 user_handle_t old_viewer; /* old clipboard viewer */
2700 unsigned int seqno; /* current sequence number */
2701 @END
2703 #define SET_CB_OPEN 0x001
2704 #define SET_CB_OWNER 0x002
2705 #define SET_CB_VIEWER 0x004
2706 #define SET_CB_SEQNO 0x008
2707 #define SET_CB_RELOWNER 0x010
2708 #define SET_CB_CLOSE 0x020
2709 #define CB_OPEN 0x040
2710 #define CB_OWNER 0x080
2711 #define CB_PROCESS 0x100
2714 /* Open a security token */
2715 @REQ(open_token)
2716 obj_handle_t handle; /* handle to the thread or process */
2717 unsigned int access; /* access rights to the new token */
2718 unsigned int attributes;/* object attributes */
2719 unsigned int flags; /* flags (see below) */
2720 @REPLY
2721 obj_handle_t token; /* handle to the token */
2722 @END
2723 #define OPEN_TOKEN_THREAD 1
2724 #define OPEN_TOKEN_AS_SELF 2
2727 /* Set/get the global windows */
2728 @REQ(set_global_windows)
2729 unsigned int flags; /* flags for fields to set (see below) */
2730 user_handle_t shell_window; /* handle to the new shell window */
2731 user_handle_t shell_listview; /* handle to the new shell listview window */
2732 user_handle_t progman_window; /* handle to the new program manager window */
2733 user_handle_t taskman_window; /* handle to the new task manager window */
2734 @REPLY
2735 user_handle_t old_shell_window; /* handle to the shell window */
2736 user_handle_t old_shell_listview; /* handle to the shell listview window */
2737 user_handle_t old_progman_window; /* handle to the new program manager window */
2738 user_handle_t old_taskman_window; /* handle to the new task manager window */
2739 @END
2740 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2741 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2742 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2744 /* Adjust the privileges held by a token */
2745 @REQ(adjust_token_privileges)
2746 obj_handle_t handle; /* handle to the token */
2747 int disable_all; /* disable all privileges? */
2748 int get_modified_state; /* get modified privileges? */
2749 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2750 @REPLY
2751 unsigned int len; /* total length in bytes required to store token privileges */
2752 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2753 @END
2755 /* Retrieves the set of privileges held by or available to a token */
2756 @REQ(get_token_privileges)
2757 obj_handle_t handle; /* handle to the token */
2758 @REPLY
2759 unsigned int len; /* total length in bytes required to store token privileges */
2760 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2761 @END
2763 /* Check the token has the required privileges */
2764 @REQ(check_token_privileges)
2765 obj_handle_t handle; /* handle to the token */
2766 int all_required; /* are all the privileges required for the check to succeed? */
2767 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2768 @REPLY
2769 int has_privileges; /* does the token have the required privileges? */
2770 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2771 @END
2773 @REQ(duplicate_token)
2774 obj_handle_t handle; /* handle to the token to duplicate */
2775 unsigned int access; /* access rights to the new token */
2776 unsigned int attributes; /* object attributes */
2777 int primary; /* is the new token to be a primary one? */
2778 int impersonation_level; /* impersonation level of the new token */
2779 @REPLY
2780 obj_handle_t new_handle; /* duplicated handle */
2781 @END
2783 @REQ(access_check)
2784 obj_handle_t handle; /* handle to the token */
2785 unsigned int desired_access; /* desired access to the object */
2786 unsigned int mapping_read; /* mapping from generic read to specific rights */
2787 unsigned int mapping_write; /* mapping from generic write to specific rights */
2788 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2789 unsigned int mapping_all; /* mapping from generic all to specific rights */
2790 VARARG(sd,security_descriptor); /* security descriptor to check */
2791 @REPLY
2792 unsigned int access_granted; /* access rights actually granted */
2793 unsigned int access_status; /* was access granted? */
2794 unsigned int privileges_len; /* length needed to store privileges */
2795 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2796 @END
2798 @REQ(get_token_user)
2799 obj_handle_t handle; /* handle to the token */
2800 @REPLY
2801 data_size_t user_len; /* length needed to store user */
2802 VARARG(user,SID); /* sid of the user the token represents */
2803 @END
2805 @REQ(get_token_groups)
2806 obj_handle_t handle; /* handle to the token */
2807 @REPLY
2808 data_size_t user_len; /* length needed to store user */
2809 VARARG(user,token_groups); /* groups the token's user belongs to */
2810 @END
2812 @REQ(set_security_object)
2813 obj_handle_t handle; /* handle to the object */
2814 unsigned int security_info; /* which parts of security descriptor to set */
2815 VARARG(sd,security_descriptor); /* security descriptor to set */
2816 @END
2818 @REQ(get_security_object)
2819 obj_handle_t handle; /* handle to the object */
2820 unsigned int security_info; /* which parts of security descriptor to get */
2821 @REPLY
2822 unsigned int sd_len; /* buffer size needed for sd */
2823 VARARG(sd,security_descriptor); /* retrieved security descriptor */
2824 @END
2826 /* Create a mailslot */
2827 @REQ(create_mailslot)
2828 unsigned int access; /* wanted access rights */
2829 unsigned int attributes; /* object attributes */
2830 obj_handle_t rootdir; /* root directory */
2831 unsigned int max_msgsize;
2832 timeout_t read_timeout;
2833 VARARG(name,unicode_str); /* mailslot name */
2834 @REPLY
2835 obj_handle_t handle; /* handle to the mailslot */
2836 @END
2839 /* Set mailslot information */
2840 @REQ(set_mailslot_info)
2841 obj_handle_t handle; /* handle to the mailslot */
2842 unsigned int flags;
2843 timeout_t read_timeout;
2844 @REPLY
2845 unsigned int max_msgsize;
2846 timeout_t read_timeout;
2847 @END
2848 #define MAILSLOT_SET_READ_TIMEOUT 1
2851 /* Create a directory object */
2852 @REQ(create_directory)
2853 unsigned int access; /* access flags */
2854 unsigned int attributes; /* object attributes */
2855 obj_handle_t rootdir; /* root directory */
2856 VARARG(directory_name,unicode_str); /* Directory name */
2857 @REPLY
2858 obj_handle_t handle; /* handle to the directory */
2859 @END
2862 /* Open a directory object */
2863 @REQ(open_directory)
2864 unsigned int access; /* access flags */
2865 unsigned int attributes; /* object attributes */
2866 obj_handle_t rootdir; /* root directory */
2867 VARARG(directory_name,unicode_str); /* Directory name */
2868 @REPLY
2869 obj_handle_t handle; /* handle to the directory */
2870 @END
2873 /* Get a directory entry by index */
2874 @REQ(get_directory_entry)
2875 obj_handle_t handle; /* handle to the directory */
2876 unsigned int index; /* entry index */
2877 @REPLY
2878 data_size_t name_len; /* length of the entry name in bytes */
2879 VARARG(name,unicode_str,name_len); /* entry name */
2880 VARARG(type,unicode_str); /* entry type */
2881 @END
2884 /* Create a symbolic link object */
2885 @REQ(create_symlink)
2886 unsigned int access; /* access flags */
2887 unsigned int attributes; /* object attributes */
2888 obj_handle_t rootdir; /* root directory */
2889 data_size_t name_len; /* length of the symlink name in bytes */
2890 VARARG(name,unicode_str,name_len); /* symlink name */
2891 VARARG(target_name,unicode_str); /* target name */
2892 @REPLY
2893 obj_handle_t handle; /* handle to the symlink */
2894 @END
2897 /* Open a symbolic link object */
2898 @REQ(open_symlink)
2899 unsigned int access; /* access flags */
2900 unsigned int attributes; /* object attributes */
2901 obj_handle_t rootdir; /* root directory */
2902 VARARG(name,unicode_str); /* symlink name */
2903 @REPLY
2904 obj_handle_t handle; /* handle to the symlink */
2905 @END
2908 /* Query a symbolic link object */
2909 @REQ(query_symlink)
2910 obj_handle_t handle; /* handle to the symlink */
2911 @REPLY
2912 VARARG(target_name,unicode_str); /* target name */
2913 @END
2916 /* Query basic object information */
2917 @REQ(get_object_info)
2918 obj_handle_t handle; /* handle to the object */
2919 @REPLY
2920 unsigned int access; /* granted access mask */
2921 unsigned int ref_count; /* object ref count */
2922 @END
2925 /* Unlink a named object */
2926 @REQ(unlink_object)
2927 obj_handle_t handle; /* handle to the object */
2928 @END
2931 /* Query the impersonation level of an impersonation token */
2932 @REQ(get_token_impersonation_level)
2933 obj_handle_t handle; /* handle to the object */
2934 @REPLY
2935 int impersonation_level; /* impersonation level of the impersonation token */
2936 @END
2938 /* Allocate a locally-unique identifier */
2939 @REQ(allocate_locally_unique_id)
2940 @REPLY
2941 luid_t luid;
2942 @END
2945 /* Create a device manager */
2946 @REQ(create_device_manager)
2947 unsigned int access; /* wanted access rights */
2948 unsigned int attributes; /* object attributes */
2949 @REPLY
2950 obj_handle_t handle; /* handle to the device */
2951 @END
2954 /* Create a device */
2955 @REQ(create_device)
2956 unsigned int access; /* wanted access rights */
2957 unsigned int attributes; /* object attributes */
2958 obj_handle_t rootdir; /* root directory */
2959 obj_handle_t manager; /* device manager */
2960 void* user_ptr; /* opaque ptr for use by client */
2961 VARARG(name,unicode_str); /* object name */
2962 @REPLY
2963 obj_handle_t handle; /* handle to the device */
2964 @END
2967 /* Delete a device */
2968 @REQ(delete_device)
2969 obj_handle_t handle; /* handle to the device */
2970 @END
2973 /* Retrieve the next pending device ioctl request */
2974 @REQ(get_next_device_request)
2975 obj_handle_t manager; /* handle to the device manager */
2976 obj_handle_t prev; /* handle to the previous ioctl */
2977 unsigned int status; /* status of the previous ioctl */
2978 VARARG(prev_data,bytes); /* output data of the previous ioctl */
2979 @REPLY
2980 obj_handle_t next; /* handle to the next ioctl */
2981 ioctl_code_t code; /* ioctl code */
2982 void* user_ptr; /* opaque ptr for the device */
2983 data_size_t in_size; /* total needed input size */
2984 data_size_t out_size; /* needed output size */
2985 VARARG(next_data,bytes); /* input data of the next ioctl */
2986 @END
2989 /* Make the current process a system process */
2990 @REQ(make_process_system)
2991 @REPLY
2992 obj_handle_t event; /* event signaled when all user processes have exited */
2993 @END
2996 /* Get detailed fixed-size information about a token */
2997 @REQ(get_token_statistics)
2998 obj_handle_t handle; /* handle to the object */
2999 @REPLY
3000 luid_t token_id; /* locally-unique identifier of the token */
3001 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3002 int primary; /* is the token primary or impersonation? */
3003 int impersonation_level; /* level of impersonation */
3004 int group_count; /* the number of groups the token is a member of */
3005 int privilege_count; /* the number of privileges the token has */
3006 @END
3009 /* Create I/O completion port */
3010 @REQ(create_completion)
3011 unsigned int access; /* desired access to a port */
3012 unsigned int attributes; /* object attributes */
3013 unsigned int concurrent; /* max number of concurrent active threads */
3014 obj_handle_t rootdir; /* root directory */
3015 VARARG(filename,string); /* port name */
3016 @REPLY
3017 obj_handle_t handle; /* port handle */
3018 @END
3021 /* Open I/O completion port */
3022 @REQ(open_completion)
3023 unsigned int access; /* desired access to a port */
3024 unsigned int attributes; /* object attributes */
3025 obj_handle_t rootdir; /* root directory */
3026 VARARG(filename,string); /* port name */
3027 @REPLY
3028 obj_handle_t handle; /* port handle */
3029 @END
3032 /* add completion to completion port */
3033 @REQ(add_completion)
3034 obj_handle_t handle; /* port handle */
3035 apc_param_t ckey; /* completion key */
3036 apc_param_t cvalue; /* completion value */
3037 unsigned int information; /* IO_STATUS_BLOCK Information */
3038 unsigned int status; /* completion result */
3039 @END
3042 /* get completion from completion port queue */
3043 @REQ(remove_completion)
3044 obj_handle_t handle; /* port handle */
3045 @REPLY
3046 apc_param_t ckey; /* completion key */
3047 apc_param_t cvalue; /* completion value */
3048 unsigned int information; /* IO_STATUS_BLOCK Information */
3049 unsigned int status; /* completion result */
3050 @END
3053 /* get completion queue depth */
3054 @REQ(query_completion)
3055 obj_handle_t handle; /* port handle */
3056 @REPLY
3057 unsigned int depth; /* completion queue depth */
3058 @END
3061 /* associate object with completion port */
3062 @REQ(set_completion_info)
3063 obj_handle_t handle; /* object handle */
3064 obj_handle_t chandle; /* port handle */
3065 apc_param_t ckey; /* completion key */
3066 @END
3069 /* check for associated completion and push msg */
3070 @REQ(add_fd_completion)
3071 obj_handle_t handle; /* async' object */
3072 apc_param_t cvalue; /* completion value */
3073 unsigned int status; /* completion status */
3074 unsigned int information; /* IO_STATUS_BLOCK Information */
3075 @END
3078 /* Retrieve layered info for a window */
3079 @REQ(get_window_layered_info)
3080 user_handle_t handle; /* handle to the window */
3081 @REPLY
3082 unsigned int color_key; /* color key */
3083 unsigned int alpha; /* alpha (0..255) */
3084 unsigned int flags; /* LWA_* flags */
3085 @END
3088 /* Set layered info for a window */
3089 @REQ(set_window_layered_info)
3090 user_handle_t handle; /* handle to the window */
3091 unsigned int color_key; /* color key */
3092 unsigned int alpha; /* alpha (0..255) */
3093 unsigned int flags; /* LWA_* flags */
3094 @END