server: Allow async i/o operations to send completion messages.
[wine/wine64.git] / server / protocol.def
blob93e4887d2f150eaeec1db340581869f63348bacb
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 void *obj_handle_t;
35 typedef void *user_handle_t;
36 typedef unsigned short atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
41 typedef unsigned __int64 file_pos_t;
43 struct request_header
45 int req; /* request code */
46 data_size_t request_size; /* request variable part size */
47 data_size_t reply_size; /* reply variable part maximum size */
50 struct reply_header
52 unsigned int error; /* error result */
53 data_size_t reply_size; /* reply variable part size */
56 /* placeholder structure for the maximum allowed request size */
57 /* this is used to construct the generic_request union */
58 struct request_max_size
60 int pad[16]; /* the max request size is 16 ints */
63 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
64 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
67 /* definitions of the event data depending on the event code */
68 struct debug_event_exception
70 EXCEPTION_RECORD record; /* exception record */
71 int first; /* first chance exception? */
73 struct debug_event_create_thread
75 obj_handle_t handle; /* handle to the new thread */
76 void *teb; /* thread teb (in debugged process address space) */
77 void *start; /* thread startup routine */
79 struct debug_event_create_process
81 obj_handle_t file; /* handle to the process exe file */
82 obj_handle_t process; /* handle to the new process */
83 obj_handle_t thread; /* handle to the new thread */
84 void *base; /* base of executable image */
85 int dbg_offset; /* offset of debug info in file */
86 int dbg_size; /* size of debug info */
87 void *teb; /* thread teb (in debugged process address space) */
88 void *start; /* thread startup routine */
89 void *name; /* image name (optional) */
90 int unicode; /* is it Unicode? */
92 struct debug_event_exit
94 int exit_code; /* thread or process exit code */
96 struct debug_event_load_dll
98 obj_handle_t handle; /* file handle for the dll */
99 void *base; /* base address of the dll */
100 int dbg_offset; /* offset of debug info in file */
101 int dbg_size; /* size of debug info */
102 void *name; /* image name (optional) */
103 int unicode; /* is it Unicode? */
105 struct debug_event_unload_dll
107 void *base; /* base address of the dll */
109 struct debug_event_output_string
111 void *string; /* string to display (in debugged process address space) */
112 int unicode; /* is it Unicode? */
113 int length; /* string length */
115 struct debug_event_rip_info
117 int error; /* ??? */
118 int type; /* ??? */
120 union debug_event_data
122 struct debug_event_exception exception;
123 struct debug_event_create_thread create_thread;
124 struct debug_event_create_process create_process;
125 struct debug_event_exit exit;
126 struct debug_event_load_dll load_dll;
127 struct debug_event_unload_dll unload_dll;
128 struct debug_event_output_string output_string;
129 struct debug_event_rip_info rip_info;
132 /* debug event data */
133 typedef struct
135 int code; /* event code */
136 union debug_event_data info; /* event information */
137 } debug_event_t;
139 /* structure used in sending an fd from client to server */
140 struct send_fd
142 thread_id_t tid; /* thread id */
143 int fd; /* file descriptor on client-side */
146 /* structure sent by the server on the wait fifo */
147 struct wake_up_reply
149 void *cookie; /* magic cookie that was passed in select_request */
150 int signaled; /* wait result */
153 /* NT-style timeout, in 100ns units, negative means relative timeout */
154 typedef __int64 timeout_t;
155 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
157 /* structure returned in the list of window properties */
158 typedef struct
160 atom_t atom; /* property atom */
161 short string; /* was atom a string originally? */
162 obj_handle_t handle; /* handle stored in property */
163 } property_data_t;
165 /* structure to specify window rectangles */
166 typedef struct
168 int left;
169 int top;
170 int right;
171 int bottom;
172 } rectangle_t;
174 /* structure for parameters of async I/O calls */
175 typedef struct
177 void *callback; /* client-side callback to call upon end of async */
178 void *iosb; /* I/O status block in client addr space */
179 void *arg; /* opaque user data to pass to callback */
180 void *apc; /* user apc to call */
181 obj_handle_t event; /* event to signal when done */
182 unsigned long cvalue; /* completion value to use for completion events */
183 } async_data_t;
185 /* structures for extra message data */
187 struct callback_msg_data
189 void *callback; /* callback function */
190 unsigned long data; /* user data for callback */
191 unsigned long result; /* message result */
194 struct winevent_msg_data
196 user_handle_t hook; /* hook handle */
197 thread_id_t tid; /* thread id */
198 void *hook_proc; /* hook proc address */
199 /* followed by module name if any */
202 typedef union
204 unsigned char bytes[1]; /* raw data for sent messages */
205 struct callback_msg_data callback;
206 struct winevent_msg_data winevent;
207 } message_data_t;
209 /* structure for console char/attribute info */
210 typedef struct
212 WCHAR ch;
213 unsigned short attr;
214 } char_info_t;
216 typedef struct
218 unsigned int low_part;
219 int high_part;
220 } luid_t;
222 #define MAX_ACL_LEN 65535
224 struct security_descriptor
226 unsigned int control; /* SE_ flags */
227 data_size_t owner_len;
228 data_size_t group_len;
229 data_size_t sacl_len;
230 data_size_t dacl_len;
231 /* VARARG(owner,SID); */
232 /* VARARG(group,SID); */
233 /* VARARG(sacl,ACL); */
234 /* VARARG(dacl,ACL); */
237 struct object_attributes
239 obj_handle_t rootdir; /* root directory */
240 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
241 data_size_t name_len; /* length of the name string. may be 0 */
242 /* VARARG(sd,security_descriptor); */
243 /* VARARG(name,unicode_str); */
246 struct token_groups
248 unsigned int count;
249 /* unsigned int attributes[count]; */
250 /* VARARG(sids,SID); */
253 enum apc_type
255 APC_NONE,
256 APC_USER,
257 APC_TIMER,
258 APC_ASYNC_IO,
259 APC_VIRTUAL_ALLOC,
260 APC_VIRTUAL_FREE,
261 APC_VIRTUAL_QUERY,
262 APC_VIRTUAL_PROTECT,
263 APC_VIRTUAL_FLUSH,
264 APC_VIRTUAL_LOCK,
265 APC_VIRTUAL_UNLOCK,
266 APC_MAP_VIEW,
267 APC_UNMAP_VIEW,
268 APC_CREATE_THREAD
271 typedef union
273 enum apc_type type;
274 struct
276 enum apc_type type; /* APC_USER */
277 void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
278 unsigned long args[3]; /* arguments for user function */
279 } user;
280 struct
282 enum apc_type type; /* APC_TIMER */
283 void (__stdcall *func)(void*, unsigned int, unsigned int);
284 timeout_t time; /* absolute time of expiration */
285 void *arg; /* user argument */
286 } timer;
287 struct
289 enum apc_type type; /* APC_ASYNC_IO */
290 unsigned int (*func)(void*, void*, unsigned int);
291 void *user; /* user pointer */
292 void *sb; /* status block */
293 unsigned int status; /* I/O status */
294 } async_io;
295 struct
297 enum apc_type type; /* APC_VIRTUAL_ALLOC */
298 void *addr; /* requested address */
299 unsigned long size; /* allocation size */
300 unsigned int zero_bits; /* allocation alignment */
301 unsigned int op_type; /* type of operation */
302 unsigned int prot; /* memory protection flags */
303 } virtual_alloc;
304 struct
306 enum apc_type type; /* APC_VIRTUAL_FREE */
307 void *addr; /* requested address */
308 unsigned long size; /* allocation size */
309 unsigned int op_type; /* type of operation */
310 } virtual_free;
311 struct
313 enum apc_type type; /* APC_VIRTUAL_QUERY */
314 const void *addr; /* requested address */
315 } virtual_query;
316 struct
318 enum apc_type type; /* APC_VIRTUAL_PROTECT */
319 void *addr; /* requested address */
320 unsigned long size; /* requested address */
321 unsigned int prot; /* new protection flags */
322 } virtual_protect;
323 struct
325 enum apc_type type; /* APC_VIRTUAL_FLUSH */
326 const void *addr; /* requested address */
327 unsigned long size; /* requested address */
328 } virtual_flush;
329 struct
331 enum apc_type type; /* APC_VIRTUAL_LOCK */
332 void *addr; /* requested address */
333 unsigned long size; /* requested address */
334 } virtual_lock;
335 struct
337 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
338 void *addr; /* requested address */
339 unsigned long size; /* requested address */
340 } virtual_unlock;
341 struct
343 enum apc_type type; /* APC_MAP_VIEW */
344 obj_handle_t handle; /* mapping handle */
345 void *addr; /* requested address */
346 unsigned long size; /* allocation size */
347 file_pos_t offset; /* file offset */
348 unsigned int zero_bits; /* allocation alignment */
349 unsigned int alloc_type;/* allocation type */
350 unsigned int prot; /* memory protection flags */
351 } map_view;
352 struct
354 enum apc_type type; /* APC_UNMAP_VIEW */
355 void *addr; /* view address */
356 } unmap_view;
357 struct
359 enum apc_type type; /* APC_CREATE_THREAD */
360 void (__stdcall *func)(void*); /* start function */
361 void *arg; /* argument for start function */
362 unsigned long reserve; /* reserve size for thread stack */
363 unsigned long commit; /* commit size for thread stack */
364 int suspend; /* suspended thread? */
365 } create_thread;
366 } apc_call_t;
368 typedef union
370 enum apc_type type;
371 struct
373 enum apc_type type; /* APC_ASYNC_IO */
374 unsigned int status; /* new status of async operation */
375 } async_io;
376 struct
378 enum apc_type type; /* APC_VIRTUAL_ALLOC */
379 unsigned int status; /* status returned by call */
380 void *addr; /* resulting address */
381 unsigned long size; /* resulting size */
382 } virtual_alloc;
383 struct
385 enum apc_type type; /* APC_VIRTUAL_FREE */
386 unsigned int status; /* status returned by call */
387 void *addr; /* resulting address */
388 unsigned long size; /* resulting size */
389 } virtual_free;
390 struct
392 enum apc_type type; /* APC_VIRTUAL_QUERY */
393 unsigned int status; /* status returned by call */
394 void *base; /* resulting base address */
395 void *alloc_base;/* resulting allocation base */
396 unsigned long size; /* resulting region size */
397 unsigned int state; /* resulting region state */
398 unsigned int prot; /* resulting region protection */
399 unsigned int alloc_prot;/* resulting allocation protection */
400 unsigned int alloc_type;/* resulting region allocation type */
401 } virtual_query;
402 struct
404 enum apc_type type; /* APC_VIRTUAL_PROTECT */
405 unsigned int status; /* status returned by call */
406 void *addr; /* resulting address */
407 unsigned long size; /* resulting size */
408 unsigned int prot; /* old protection flags */
409 } virtual_protect;
410 struct
412 enum apc_type type; /* APC_VIRTUAL_FLUSH */
413 unsigned int status; /* status returned by call */
414 const void *addr; /* resulting address */
415 unsigned long size; /* resulting size */
416 } virtual_flush;
417 struct
419 enum apc_type type; /* APC_VIRTUAL_LOCK */
420 unsigned int status; /* status returned by call */
421 void *addr; /* resulting address */
422 unsigned long size; /* resulting size */
423 } virtual_lock;
424 struct
426 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
427 unsigned int status; /* status returned by call */
428 void *addr; /* resulting address */
429 unsigned long size; /* resulting size */
430 } virtual_unlock;
431 struct
433 enum apc_type type; /* APC_MAP_VIEW */
434 unsigned int status; /* status returned by call */
435 void *addr; /* resulting address */
436 unsigned long size; /* resulting size */
437 } map_view;
438 struct
440 enum apc_type type; /* APC_MAP_VIEW */
441 unsigned int status; /* status returned by call */
442 } unmap_view;
443 struct
445 enum apc_type type; /* APC_CREATE_THREAD */
446 unsigned int status; /* status returned by call */
447 thread_id_t tid; /* thread id */
448 obj_handle_t handle; /* handle to new thread */
449 } create_thread;
450 } apc_result_t;
452 /****************************************************************/
453 /* Request declarations */
455 /* Create a new process from the context of the parent */
456 @REQ(new_process)
457 int inherit_all; /* inherit all handles from parent */
458 unsigned int create_flags; /* creation flags */
459 int socket_fd; /* file descriptor for process socket */
460 obj_handle_t exe_file; /* file handle for main exe */
461 obj_handle_t hstdin; /* handle for stdin */
462 obj_handle_t hstdout; /* handle for stdout */
463 obj_handle_t hstderr; /* handle for stderr */
464 unsigned int process_access; /* access rights for process object */
465 unsigned int process_attr; /* attributes for process object */
466 unsigned int thread_access; /* access rights for thread object */
467 unsigned int thread_attr; /* attributes for thread object */
468 VARARG(info,startup_info); /* startup information */
469 VARARG(env,unicode_str); /* environment for new process */
470 @REPLY
471 obj_handle_t info; /* new process info handle */
472 process_id_t pid; /* process id */
473 obj_handle_t phandle; /* process handle (in the current process) */
474 thread_id_t tid; /* thread id */
475 obj_handle_t thandle; /* thread handle (in the current process) */
476 @END
479 /* Retrieve information about a newly started process */
480 @REQ(get_new_process_info)
481 obj_handle_t info; /* info handle returned from new_process_request */
482 @REPLY
483 int success; /* did the process start successfully? */
484 int exit_code; /* process exit code if failed */
485 @END
488 /* Create a new thread from the context of the parent */
489 @REQ(new_thread)
490 unsigned int access; /* wanted access rights */
491 unsigned int attributes; /* object attributes */
492 int suspend; /* new thread should be suspended on creation */
493 int request_fd; /* fd for request pipe */
494 @REPLY
495 thread_id_t tid; /* thread id */
496 obj_handle_t handle; /* thread handle (in the current process) */
497 @END
500 /* Retrieve the new process startup info */
501 @REQ(get_startup_info)
502 @REPLY
503 obj_handle_t exe_file; /* file handle for main exe */
504 obj_handle_t hstdin; /* handle for stdin */
505 obj_handle_t hstdout; /* handle for stdout */
506 obj_handle_t hstderr; /* handle for stderr */
507 VARARG(info,startup_info); /* startup information */
508 VARARG(env,unicode_str); /* environment */
509 @END
512 /* Signal the end of the process initialization */
513 @REQ(init_process_done)
514 void* module; /* main module base address */
515 void* entry; /* process entry point */
516 int gui; /* is it a GUI process? */
517 @END
520 /* Initialize a thread; called from the child after fork()/clone() */
521 @REQ(init_thread)
522 int unix_pid; /* Unix pid of new thread */
523 int unix_tid; /* Unix tid of new thread */
524 int debug_level; /* new debug level */
525 void* teb; /* TEB of new thread (in thread address space) */
526 void* peb; /* address of PEB (in thread address space) */
527 void* entry; /* thread entry point (in thread address space) */
528 void* ldt_copy; /* address of LDT copy (in thread address space) */
529 int reply_fd; /* fd for reply pipe */
530 int wait_fd; /* fd for blocking calls pipe */
531 @REPLY
532 process_id_t pid; /* process id of the new thread's process */
533 thread_id_t tid; /* thread id of the new thread */
534 data_size_t info_size; /* total size of startup info */
535 timeout_t server_start; /* server start time */
536 int version; /* protocol version */
537 @END
540 /* Terminate a process */
541 @REQ(terminate_process)
542 obj_handle_t handle; /* process handle to terminate */
543 int exit_code; /* process exit code */
544 @REPLY
545 int self; /* suicide? */
546 @END
549 /* Terminate a thread */
550 @REQ(terminate_thread)
551 obj_handle_t handle; /* thread handle to terminate */
552 int exit_code; /* thread exit code */
553 @REPLY
554 int self; /* suicide? */
555 int last; /* last thread in this process? */
556 @END
559 /* Retrieve information about a process */
560 @REQ(get_process_info)
561 obj_handle_t handle; /* process handle */
562 @REPLY
563 process_id_t pid; /* server process id */
564 process_id_t ppid; /* server process id of parent */
565 int exit_code; /* process exit code */
566 int priority; /* priority class */
567 int affinity; /* process affinity mask */
568 void* peb; /* PEB address in process address space */
569 timeout_t start_time; /* process start time */
570 timeout_t end_time; /* process end time */
571 @END
574 /* Set a process informations */
575 @REQ(set_process_info)
576 obj_handle_t handle; /* process handle */
577 int mask; /* setting mask (see below) */
578 int priority; /* priority class */
579 int affinity; /* affinity mask */
580 @END
581 #define SET_PROCESS_INFO_PRIORITY 0x01
582 #define SET_PROCESS_INFO_AFFINITY 0x02
585 /* Retrieve information about a thread */
586 @REQ(get_thread_info)
587 obj_handle_t handle; /* thread handle */
588 thread_id_t tid_in; /* thread id (optional) */
589 @REPLY
590 process_id_t pid; /* server process id */
591 thread_id_t tid; /* server thread id */
592 void* teb; /* thread teb pointer */
593 int exit_code; /* thread exit code */
594 int priority; /* thread priority level */
595 int affinity; /* thread affinity mask */
596 timeout_t creation_time; /* thread creation time */
597 timeout_t exit_time; /* thread exit time */
598 int last; /* last thread in process */
599 @END
602 /* Set a thread informations */
603 @REQ(set_thread_info)
604 obj_handle_t handle; /* thread handle */
605 int mask; /* setting mask (see below) */
606 int priority; /* priority class */
607 int affinity; /* affinity mask */
608 obj_handle_t token; /* impersonation token */
609 @END
610 #define SET_THREAD_INFO_PRIORITY 0x01
611 #define SET_THREAD_INFO_AFFINITY 0x02
612 #define SET_THREAD_INFO_TOKEN 0x04
615 /* Retrieve information about a module */
616 @REQ(get_dll_info)
617 obj_handle_t handle; /* process handle */
618 void* base_address; /* base address of module */
619 @REPLY
620 size_t size; /* module size */
621 void* entry_point;
622 VARARG(filename,unicode_str); /* file name of module */
623 @END
626 /* Suspend a thread */
627 @REQ(suspend_thread)
628 obj_handle_t handle; /* thread handle */
629 @REPLY
630 int count; /* new suspend count */
631 @END
634 /* Resume a thread */
635 @REQ(resume_thread)
636 obj_handle_t handle; /* thread handle */
637 @REPLY
638 int count; /* new suspend count */
639 @END
642 /* Notify the server that a dll has been loaded */
643 @REQ(load_dll)
644 obj_handle_t handle; /* file handle */
645 void* base; /* base address */
646 size_t size; /* dll size */
647 int dbg_offset; /* debug info offset */
648 int dbg_size; /* debug info size */
649 void* name; /* ptr to ptr to name (in process addr space) */
650 VARARG(filename,unicode_str); /* file name of dll */
651 @END
654 /* Notify the server that a dll is being unloaded */
655 @REQ(unload_dll)
656 void* base; /* base address */
657 @END
660 /* Queue an APC for a thread or process */
661 @REQ(queue_apc)
662 obj_handle_t thread; /* thread handle */
663 obj_handle_t process; /* process handle */
664 apc_call_t call; /* call arguments */
665 @REPLY
666 obj_handle_t handle; /* APC handle */
667 int self; /* run APC in caller itself? */
668 @END
671 /* Get the result of an APC call */
672 @REQ(get_apc_result)
673 obj_handle_t handle; /* handle to the APC */
674 @REPLY
675 apc_result_t result; /* result of the APC */
676 @END
679 /* Close a handle for the current process */
680 @REQ(close_handle)
681 obj_handle_t handle; /* handle to close */
682 @END
685 /* Set a handle information */
686 @REQ(set_handle_info)
687 obj_handle_t handle; /* handle we are interested in */
688 int flags; /* new handle flags */
689 int mask; /* mask for flags to set */
690 @REPLY
691 int old_flags; /* old flag value */
692 @END
695 /* Duplicate a handle */
696 @REQ(dup_handle)
697 obj_handle_t src_process; /* src process handle */
698 obj_handle_t src_handle; /* src handle to duplicate */
699 obj_handle_t dst_process; /* dst process handle */
700 unsigned int access; /* wanted access rights */
701 unsigned int attributes; /* object attributes */
702 unsigned int options; /* duplicate options (see below) */
703 @REPLY
704 obj_handle_t handle; /* duplicated handle in dst process */
705 int self; /* is the source the current process? */
706 int closed; /* whether the source handle has been closed */
707 @END
708 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
709 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
710 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
713 /* Open a handle to a process */
714 @REQ(open_process)
715 process_id_t pid; /* process id to open */
716 unsigned int access; /* wanted access rights */
717 unsigned int attributes; /* object attributes */
718 @REPLY
719 obj_handle_t handle; /* handle to the process */
720 @END
723 /* Open a handle to a thread */
724 @REQ(open_thread)
725 thread_id_t tid; /* thread id to open */
726 unsigned int access; /* wanted access rights */
727 unsigned int attributes; /* object attributes */
728 @REPLY
729 obj_handle_t handle; /* handle to the thread */
730 @END
733 /* Wait for handles */
734 @REQ(select)
735 int flags; /* wait flags (see below) */
736 void* cookie; /* magic cookie to return to client */
737 obj_handle_t signal; /* object to signal (0 if none) */
738 obj_handle_t prev_apc; /* handle to previous APC */
739 timeout_t timeout; /* timeout */
740 VARARG(result,apc_result); /* result of previous APC */
741 VARARG(handles,handles); /* handles to select on */
742 @REPLY
743 obj_handle_t apc_handle; /* handle to next APC */
744 timeout_t timeout; /* timeout converted to absolute */
745 apc_call_t call; /* APC call arguments */
746 @END
747 #define SELECT_ALL 1
748 #define SELECT_ALERTABLE 2
749 #define SELECT_INTERRUPTIBLE 4
752 /* Create an event */
753 @REQ(create_event)
754 unsigned int access; /* wanted access rights */
755 unsigned int attributes; /* object attributes */
756 int manual_reset; /* manual reset event */
757 int initial_state; /* initial state of the event */
758 VARARG(objattr,object_attributes); /* object attributes */
759 @REPLY
760 obj_handle_t handle; /* handle to the event */
761 @END
763 /* Event operation */
764 @REQ(event_op)
765 obj_handle_t handle; /* handle to event */
766 int op; /* event operation (see below) */
767 @END
768 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
771 /* Open an event */
772 @REQ(open_event)
773 unsigned int access; /* wanted access rights */
774 unsigned int attributes; /* object attributes */
775 obj_handle_t rootdir; /* root directory */
776 VARARG(name,unicode_str); /* object name */
777 @REPLY
778 obj_handle_t handle; /* handle to the event */
779 @END
782 /* Create a mutex */
783 @REQ(create_mutex)
784 unsigned int access; /* wanted access rights */
785 unsigned int attributes; /* object attributes */
786 int owned; /* initially owned? */
787 VARARG(objattr,object_attributes); /* object attributes */
788 @REPLY
789 obj_handle_t handle; /* handle to the mutex */
790 @END
793 /* Release a mutex */
794 @REQ(release_mutex)
795 obj_handle_t handle; /* handle to the mutex */
796 @REPLY
797 unsigned int prev_count; /* value of internal counter, before release */
798 @END
801 /* Open a mutex */
802 @REQ(open_mutex)
803 unsigned int access; /* wanted access rights */
804 unsigned int attributes; /* object attributes */
805 obj_handle_t rootdir; /* root directory */
806 VARARG(name,unicode_str); /* object name */
807 @REPLY
808 obj_handle_t handle; /* handle to the mutex */
809 @END
812 /* Create a semaphore */
813 @REQ(create_semaphore)
814 unsigned int access; /* wanted access rights */
815 unsigned int attributes; /* object attributes */
816 unsigned int initial; /* initial count */
817 unsigned int max; /* maximum count */
818 VARARG(objattr,object_attributes); /* object attributes */
819 @REPLY
820 obj_handle_t handle; /* handle to the semaphore */
821 @END
824 /* Release a semaphore */
825 @REQ(release_semaphore)
826 obj_handle_t handle; /* handle to the semaphore */
827 unsigned int count; /* count to add to semaphore */
828 @REPLY
829 unsigned int prev_count; /* previous semaphore count */
830 @END
833 /* Open a semaphore */
834 @REQ(open_semaphore)
835 unsigned int access; /* wanted access rights */
836 unsigned int attributes; /* object attributes */
837 obj_handle_t rootdir; /* root directory */
838 VARARG(name,unicode_str); /* object name */
839 @REPLY
840 obj_handle_t handle; /* handle to the semaphore */
841 @END
844 /* Create a file */
845 @REQ(create_file)
846 unsigned int access; /* wanted access rights */
847 unsigned int attributes; /* object attributes */
848 unsigned int sharing; /* sharing flags */
849 int create; /* file create action */
850 unsigned int options; /* file options */
851 unsigned int attrs; /* file attributes for creation */
852 VARARG(objattr,object_attributes); /* object attributes */
853 VARARG(filename,string); /* file name */
854 @REPLY
855 obj_handle_t handle; /* handle to the file */
856 @END
859 /* Open a file object */
860 @REQ(open_file_object)
861 unsigned int access; /* wanted access rights */
862 unsigned int attributes; /* open attributes */
863 obj_handle_t rootdir; /* root directory */
864 unsigned int sharing; /* sharing flags */
865 unsigned int options; /* file options */
866 VARARG(filename,unicode_str); /* file name */
867 @REPLY
868 obj_handle_t handle; /* handle to the file */
869 @END
872 /* Allocate a file handle for a Unix fd */
873 @REQ(alloc_file_handle)
874 unsigned int access; /* wanted access rights */
875 unsigned int attributes; /* object attributes */
876 int fd; /* file descriptor on the client side */
877 @REPLY
878 obj_handle_t handle; /* handle to the file */
879 @END
882 /* Get a Unix fd to access a file */
883 @REQ(get_handle_fd)
884 obj_handle_t handle; /* handle to the file */
885 @REPLY
886 int type; /* file type (see below) */
887 int removable; /* is file removable? */
888 unsigned int access; /* file access rights */
889 unsigned int options; /* file open options */
890 @END
891 enum server_fd_type
893 FD_TYPE_INVALID, /* invalid file (no associated fd) */
894 FD_TYPE_FILE, /* regular file */
895 FD_TYPE_DIR, /* directory */
896 FD_TYPE_SOCKET, /* socket */
897 FD_TYPE_SERIAL, /* serial port */
898 FD_TYPE_PIPE, /* named pipe */
899 FD_TYPE_MAILSLOT, /* mailslot */
900 FD_TYPE_CHAR, /* unspecified char device */
901 FD_TYPE_DEVICE, /* Windows device file */
902 FD_TYPE_NB_TYPES
906 /* Flush a file buffers */
907 @REQ(flush_file)
908 obj_handle_t handle; /* handle to the file */
909 @REPLY
910 obj_handle_t event; /* event set when finished */
911 @END
914 /* Lock a region of a file */
915 @REQ(lock_file)
916 obj_handle_t handle; /* handle to the file */
917 file_pos_t offset; /* offset of start of lock */
918 file_pos_t count; /* count of bytes to lock */
919 int shared; /* shared or exclusive lock? */
920 int wait; /* do we want to wait? */
921 @REPLY
922 obj_handle_t handle; /* handle to wait on */
923 int overlapped; /* is it an overlapped I/O handle? */
924 @END
927 /* Unlock a region of a file */
928 @REQ(unlock_file)
929 obj_handle_t handle; /* handle to the file */
930 file_pos_t offset; /* offset of start of unlock */
931 file_pos_t count; /* count of bytes to unlock */
932 @END
935 /* Create a socket */
936 @REQ(create_socket)
937 unsigned int access; /* wanted access rights */
938 unsigned int attributes; /* object attributes */
939 int family; /* family, see socket manpage */
940 int type; /* type, see socket manpage */
941 int protocol; /* protocol, see socket manpage */
942 unsigned int flags; /* socket flags */
943 @REPLY
944 obj_handle_t handle; /* handle to the new socket */
945 @END
948 /* Accept a socket */
949 @REQ(accept_socket)
950 obj_handle_t lhandle; /* handle to the listening socket */
951 unsigned int access; /* wanted access rights */
952 unsigned int attributes; /* object attributes */
953 @REPLY
954 obj_handle_t handle; /* handle to the new socket */
955 @END
958 /* Set socket event parameters */
959 @REQ(set_socket_event)
960 obj_handle_t handle; /* handle to the socket */
961 unsigned int mask; /* event mask */
962 obj_handle_t event; /* event object */
963 user_handle_t window; /* window to send the message to */
964 unsigned int msg; /* message to send */
965 @END
968 /* Get socket event parameters */
969 @REQ(get_socket_event)
970 obj_handle_t handle; /* handle to the socket */
971 int service; /* clear pending? */
972 obj_handle_t c_event; /* event to clear */
973 @REPLY
974 unsigned int mask; /* event mask */
975 unsigned int pmask; /* pending events */
976 unsigned int state; /* status bits */
977 VARARG(errors,ints); /* event errors */
978 @END
981 /* Reenable pending socket events */
982 @REQ(enable_socket_event)
983 obj_handle_t handle; /* handle to the socket */
984 unsigned int mask; /* events to re-enable */
985 unsigned int sstate; /* status bits to set */
986 unsigned int cstate; /* status bits to clear */
987 @END
989 @REQ(set_socket_deferred)
990 obj_handle_t handle; /* handle to the socket */
991 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
992 @END
994 /* Allocate a console (only used by a console renderer) */
995 @REQ(alloc_console)
996 unsigned int access; /* wanted access rights */
997 unsigned int attributes; /* object attributes */
998 process_id_t pid; /* pid of process which shall be attached to the console */
999 @REPLY
1000 obj_handle_t handle_in; /* handle to console input */
1001 obj_handle_t event; /* handle to renderer events change notification */
1002 @END
1005 /* Free the console of the current process */
1006 @REQ(free_console)
1007 @END
1010 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1011 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1012 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1013 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1014 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1015 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1016 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1017 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1018 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1019 struct console_renderer_event
1021 short event;
1022 union
1024 struct update
1026 short top;
1027 short bottom;
1028 } update;
1029 struct resize
1031 short width;
1032 short height;
1033 } resize;
1034 struct cursor_pos
1036 short x;
1037 short y;
1038 } cursor_pos;
1039 struct cursor_geom
1041 short visible;
1042 short size;
1043 } cursor_geom;
1044 struct display
1046 short left;
1047 short top;
1048 short width;
1049 short height;
1050 } display;
1051 } u;
1054 /* retrieve console events for the renderer */
1055 @REQ(get_console_renderer_events)
1056 obj_handle_t handle; /* handle to console input events */
1057 @REPLY
1058 VARARG(data,bytes); /* the various console_renderer_events */
1059 @END
1062 /* Open a handle to the process console */
1063 @REQ(open_console)
1064 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1065 /* otherwise console_in handle to get active screen buffer? */
1066 unsigned int access; /* wanted access rights */
1067 unsigned int attributes; /* object attributes */
1068 int share; /* share mask (only for output handles) */
1069 @REPLY
1070 obj_handle_t handle; /* handle to the console */
1071 @END
1074 /* Get the input queue wait event */
1075 @REQ(get_console_wait_event)
1076 @REPLY
1077 obj_handle_t handle;
1078 @END
1080 /* Get a console mode (input or output) */
1081 @REQ(get_console_mode)
1082 obj_handle_t handle; /* handle to the console */
1083 @REPLY
1084 int mode; /* console mode */
1085 @END
1088 /* Set a console mode (input or output) */
1089 @REQ(set_console_mode)
1090 obj_handle_t handle; /* handle to the console */
1091 int mode; /* console mode */
1092 @END
1095 /* Set info about a console (input only) */
1096 @REQ(set_console_input_info)
1097 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1098 int mask; /* setting mask (see below) */
1099 obj_handle_t active_sb; /* active screen buffer */
1100 int history_mode; /* whether we duplicate lines in history */
1101 int history_size; /* number of lines in history */
1102 int edition_mode; /* index to the edition mode flavors */
1103 int input_cp; /* console input codepage */
1104 int output_cp; /* console output codepage */
1105 user_handle_t win; /* console window if backend supports it */
1106 VARARG(title,unicode_str); /* console title */
1107 @END
1108 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1109 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1110 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1111 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1112 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1113 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1114 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1115 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1118 /* Get info about a console (input only) */
1119 @REQ(get_console_input_info)
1120 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1121 @REPLY
1122 int history_mode; /* whether we duplicate lines in history */
1123 int history_size; /* number of lines in history */
1124 int history_index; /* number of used lines in history */
1125 int edition_mode; /* index to the edition mode flavors */
1126 int input_cp; /* console input codepage */
1127 int output_cp; /* console output codepage */
1128 user_handle_t win; /* console window if backend supports it */
1129 VARARG(title,unicode_str); /* console title */
1130 @END
1133 /* appends a string to console's history */
1134 @REQ(append_console_input_history)
1135 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1136 VARARG(line,unicode_str); /* line to add */
1137 @END
1140 /* appends a string to console's history */
1141 @REQ(get_console_input_history)
1142 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1143 int index; /* index to get line from */
1144 @REPLY
1145 int total; /* total length of line in Unicode chars */
1146 VARARG(line,unicode_str); /* line to add */
1147 @END
1150 /* creates a new screen buffer on process' console */
1151 @REQ(create_console_output)
1152 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1153 unsigned int access; /* wanted access rights */
1154 unsigned int attributes; /* object attributes */
1155 unsigned int share; /* sharing credentials */
1156 @REPLY
1157 obj_handle_t handle_out; /* handle to the screen buffer */
1158 @END
1161 /* Set info about a console (output only) */
1162 @REQ(set_console_output_info)
1163 obj_handle_t handle; /* handle to the console */
1164 int mask; /* setting mask (see below) */
1165 short int cursor_size; /* size of cursor (percentage filled) */
1166 short int cursor_visible;/* cursor visibility flag */
1167 short int cursor_x; /* position of cursor (x, y) */
1168 short int cursor_y;
1169 short int width; /* width of the screen buffer */
1170 short int height; /* height of the screen buffer */
1171 short int attr; /* default attribute */
1172 short int win_left; /* window actually displayed by renderer */
1173 short int win_top; /* the rect area is expressed withing the */
1174 short int win_right; /* boundaries of the screen buffer */
1175 short int win_bottom;
1176 short int max_width; /* maximum size (width x height) for the window */
1177 short int max_height;
1178 @END
1179 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1180 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1181 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1182 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1183 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1184 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1187 /* Get info about a console (output only) */
1188 @REQ(get_console_output_info)
1189 obj_handle_t handle; /* handle to the console */
1190 @REPLY
1191 short int cursor_size; /* size of cursor (percentage filled) */
1192 short int cursor_visible;/* cursor visibility flag */
1193 short int cursor_x; /* position of cursor (x, y) */
1194 short int cursor_y;
1195 short int width; /* width of the screen buffer */
1196 short int height; /* height of the screen buffer */
1197 short int attr; /* default attribute */
1198 short int win_left; /* window actually displayed by renderer */
1199 short int win_top; /* the rect area is expressed withing the */
1200 short int win_right; /* boundaries of the screen buffer */
1201 short int win_bottom;
1202 short int max_width; /* maximum size (width x height) for the window */
1203 short int max_height;
1204 @END
1206 /* Add input records to a console input queue */
1207 @REQ(write_console_input)
1208 obj_handle_t handle; /* handle to the console input */
1209 VARARG(rec,input_records); /* input records */
1210 @REPLY
1211 int written; /* number of records written */
1212 @END
1215 /* Fetch input records from a console input queue */
1216 @REQ(read_console_input)
1217 obj_handle_t handle; /* handle to the console input */
1218 int flush; /* flush the retrieved records from the queue? */
1219 @REPLY
1220 int read; /* number of records read */
1221 VARARG(rec,input_records); /* input records */
1222 @END
1225 /* write data (chars and/or attributes) in a screen buffer */
1226 @REQ(write_console_output)
1227 obj_handle_t handle; /* handle to the console output */
1228 int x; /* position where to start writing */
1229 int y;
1230 int mode; /* char info (see below) */
1231 int wrap; /* wrap around at end of line? */
1232 VARARG(data,bytes); /* info to write */
1233 @REPLY
1234 int written; /* number of char infos actually written */
1235 int width; /* width of screen buffer */
1236 int height; /* height of screen buffer */
1237 @END
1238 enum char_info_mode
1240 CHAR_INFO_MODE_TEXT, /* characters only */
1241 CHAR_INFO_MODE_ATTR, /* attributes only */
1242 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1243 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1247 /* fill a screen buffer with constant data (chars and/or attributes) */
1248 @REQ(fill_console_output)
1249 obj_handle_t handle; /* handle to the console output */
1250 int x; /* position where to start writing */
1251 int y;
1252 int mode; /* char info mode */
1253 int count; /* number to write */
1254 int wrap; /* wrap around at end of line? */
1255 char_info_t data; /* data to write */
1256 @REPLY
1257 int written; /* number of char infos actually written */
1258 @END
1261 /* read data (chars and/or attributes) from a screen buffer */
1262 @REQ(read_console_output)
1263 obj_handle_t handle; /* handle to the console output */
1264 int x; /* position (x,y) where to start reading */
1265 int y;
1266 int mode; /* char info mode */
1267 int wrap; /* wrap around at end of line? */
1268 @REPLY
1269 int width; /* width of screen buffer */
1270 int height; /* height of screen buffer */
1271 VARARG(data,bytes);
1272 @END
1275 /* move a rect (of data) in screen buffer content */
1276 @REQ(move_console_output)
1277 obj_handle_t handle; /* handle to the console output */
1278 short int x_src; /* position (x, y) of rect to start moving from */
1279 short int y_src;
1280 short int x_dst; /* position (x, y) of rect to move to */
1281 short int y_dst;
1282 short int w; /* size of the rect (width, height) to move */
1283 short int h;
1284 @END
1287 /* Sends a signal to a process group */
1288 @REQ(send_console_signal)
1289 int signal; /* the signal to send */
1290 process_id_t group_id; /* the group to send the signal to */
1291 @END
1294 /* enable directory change notifications */
1295 @REQ(read_directory_changes)
1296 unsigned int filter; /* notification filter */
1297 obj_handle_t handle; /* handle to the directory */
1298 int subtree; /* watch the subtree? */
1299 int want_data; /* flag indicating whether change data should be collected */
1300 async_data_t async; /* async I/O parameters */
1301 @END
1304 @REQ(read_change)
1305 obj_handle_t handle;
1306 @REPLY
1307 int action; /* type of change */
1308 VARARG(name,string); /* name of directory entry that changed */
1309 @END
1312 /* Create a file mapping */
1313 @REQ(create_mapping)
1314 unsigned int access; /* wanted access rights */
1315 unsigned int attributes; /* object attributes */
1316 file_pos_t size; /* mapping size */
1317 int protect; /* protection flags (see below) */
1318 obj_handle_t file_handle; /* file handle */
1319 VARARG(objattr,object_attributes); /* object attributes */
1320 @REPLY
1321 obj_handle_t handle; /* handle to the mapping */
1322 @END
1323 /* protection flags */
1324 #define VPROT_READ 0x01
1325 #define VPROT_WRITE 0x02
1326 #define VPROT_EXEC 0x04
1327 #define VPROT_WRITECOPY 0x08
1328 #define VPROT_GUARD 0x10
1329 #define VPROT_NOCACHE 0x20
1330 #define VPROT_COMMITTED 0x40
1331 #define VPROT_IMAGE 0x80
1334 /* Open a mapping */
1335 @REQ(open_mapping)
1336 unsigned int access; /* wanted access rights */
1337 unsigned int attributes; /* object attributes */
1338 obj_handle_t rootdir; /* root directory */
1339 VARARG(name,unicode_str); /* object name */
1340 @REPLY
1341 obj_handle_t handle; /* handle to the mapping */
1342 @END
1345 /* Get information about a file mapping */
1346 @REQ(get_mapping_info)
1347 obj_handle_t handle; /* handle to the mapping */
1348 @REPLY
1349 file_pos_t size; /* mapping size */
1350 int protect; /* protection flags */
1351 int header_size; /* header size (for VPROT_IMAGE mapping) */
1352 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1353 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1354 obj_handle_t shared_file; /* shared mapping file handle */
1355 @END
1358 #define SNAP_HEAPLIST 0x00000001
1359 #define SNAP_PROCESS 0x00000002
1360 #define SNAP_THREAD 0x00000004
1361 #define SNAP_MODULE 0x00000008
1362 /* Create a snapshot */
1363 @REQ(create_snapshot)
1364 unsigned int attributes; /* object attributes */
1365 int flags; /* snapshot flags (SNAP_*) */
1366 process_id_t pid; /* process id */
1367 @REPLY
1368 obj_handle_t handle; /* handle to the snapshot */
1369 @END
1372 /* Get the next process from a snapshot */
1373 @REQ(next_process)
1374 obj_handle_t handle; /* handle to the snapshot */
1375 int reset; /* reset snapshot position? */
1376 @REPLY
1377 int count; /* process usage count */
1378 process_id_t pid; /* process id */
1379 process_id_t ppid; /* parent process id */
1380 void* heap; /* heap base */
1381 void* module; /* main module */
1382 int threads; /* number of threads */
1383 int priority; /* process priority */
1384 int handles; /* number of handles */
1385 VARARG(filename,unicode_str); /* file name of main exe */
1386 @END
1389 /* Get the next thread from a snapshot */
1390 @REQ(next_thread)
1391 obj_handle_t handle; /* handle to the snapshot */
1392 int reset; /* reset snapshot position? */
1393 @REPLY
1394 int count; /* thread usage count */
1395 process_id_t pid; /* process id */
1396 thread_id_t tid; /* thread id */
1397 int base_pri; /* base priority */
1398 int delta_pri; /* delta priority */
1399 @END
1402 /* Get the next module from a snapshot */
1403 @REQ(next_module)
1404 obj_handle_t handle; /* handle to the snapshot */
1405 int reset; /* reset snapshot position? */
1406 @REPLY
1407 process_id_t pid; /* process id */
1408 void* base; /* module base address */
1409 size_t size; /* module size */
1410 VARARG(filename,unicode_str); /* file name of module */
1411 @END
1414 /* Wait for a debug event */
1415 @REQ(wait_debug_event)
1416 int get_handle; /* should we alloc a handle for waiting? */
1417 @REPLY
1418 process_id_t pid; /* process id */
1419 thread_id_t tid; /* thread id */
1420 obj_handle_t wait; /* wait handle if no event ready */
1421 VARARG(event,debug_event); /* debug event data */
1422 @END
1425 /* Queue an exception event */
1426 @REQ(queue_exception_event)
1427 int first; /* first chance exception? */
1428 VARARG(record,exc_event); /* thread context followed by exception record */
1429 @REPLY
1430 obj_handle_t handle; /* handle to the queued event */
1431 @END
1434 /* Retrieve the status of an exception event */
1435 @REQ(get_exception_status)
1436 obj_handle_t handle; /* handle to the queued event */
1437 @REPLY
1438 VARARG(context,context); /* modified thread context */
1439 @END
1442 /* Send an output string to the debugger */
1443 @REQ(output_debug_string)
1444 void* string; /* string to display (in debugged process address space) */
1445 int unicode; /* is it Unicode? */
1446 int length; /* string length */
1447 @END
1450 /* Continue a debug event */
1451 @REQ(continue_debug_event)
1452 process_id_t pid; /* process id to continue */
1453 thread_id_t tid; /* thread id to continue */
1454 int status; /* continuation status */
1455 @END
1458 /* Start/stop debugging an existing process */
1459 @REQ(debug_process)
1460 process_id_t pid; /* id of the process to debug */
1461 int attach; /* 1=attaching / 0=detaching from the process */
1462 @END
1465 /* Simulate a breakpoint in a process */
1466 @REQ(debug_break)
1467 obj_handle_t handle; /* process handle */
1468 @REPLY
1469 int self; /* was it the caller itself? */
1470 @END
1473 /* Set debugger kill on exit flag */
1474 @REQ(set_debugger_kill_on_exit)
1475 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1476 @END
1479 /* Read data from a process address space */
1480 @REQ(read_process_memory)
1481 obj_handle_t handle; /* process handle */
1482 void* addr; /* addr to read from */
1483 @REPLY
1484 VARARG(data,bytes); /* result data */
1485 @END
1488 /* Write data to a process address space */
1489 @REQ(write_process_memory)
1490 obj_handle_t handle; /* process handle */
1491 void* addr; /* addr to write to */
1492 VARARG(data,bytes); /* data to write */
1493 @END
1496 /* Create a registry key */
1497 @REQ(create_key)
1498 obj_handle_t parent; /* handle to the parent key */
1499 unsigned int access; /* desired access rights */
1500 unsigned int attributes; /* object attributes */
1501 unsigned int options; /* creation options */
1502 time_t modif; /* last modification time */
1503 data_size_t namelen; /* length of key name in bytes */
1504 VARARG(name,unicode_str,namelen); /* key name */
1505 VARARG(class,unicode_str); /* class name */
1506 @REPLY
1507 obj_handle_t hkey; /* handle to the created key */
1508 int created; /* has it been newly created? */
1509 @END
1511 /* Open a registry key */
1512 @REQ(open_key)
1513 obj_handle_t parent; /* handle to the parent key */
1514 unsigned int access; /* desired access rights */
1515 unsigned int attributes; /* object attributes */
1516 VARARG(name,unicode_str); /* key name */
1517 @REPLY
1518 obj_handle_t hkey; /* handle to the open key */
1519 @END
1522 /* Delete a registry key */
1523 @REQ(delete_key)
1524 obj_handle_t hkey; /* handle to the key */
1525 @END
1528 /* Flush a registry key */
1529 @REQ(flush_key)
1530 obj_handle_t hkey; /* handle to the key */
1531 @END
1534 /* Enumerate registry subkeys */
1535 @REQ(enum_key)
1536 obj_handle_t hkey; /* handle to registry key */
1537 int index; /* index of subkey (or -1 for current key) */
1538 int info_class; /* requested information class */
1539 @REPLY
1540 int subkeys; /* number of subkeys */
1541 int max_subkey; /* longest subkey name */
1542 int max_class; /* longest class name */
1543 int values; /* number of values */
1544 int max_value; /* longest value name */
1545 int max_data; /* longest value data */
1546 time_t modif; /* last modification time */
1547 data_size_t total; /* total length needed for full name and class */
1548 data_size_t namelen; /* length of key name in bytes */
1549 VARARG(name,unicode_str,namelen); /* key name */
1550 VARARG(class,unicode_str); /* class name */
1551 @END
1554 /* Set a value of a registry key */
1555 @REQ(set_key_value)
1556 obj_handle_t hkey; /* handle to registry key */
1557 int type; /* value type */
1558 data_size_t namelen; /* length of value name in bytes */
1559 VARARG(name,unicode_str,namelen); /* value name */
1560 VARARG(data,bytes); /* value data */
1561 @END
1564 /* Retrieve the value of a registry key */
1565 @REQ(get_key_value)
1566 obj_handle_t hkey; /* handle to registry key */
1567 VARARG(name,unicode_str); /* value name */
1568 @REPLY
1569 int type; /* value type */
1570 data_size_t total; /* total length needed for data */
1571 VARARG(data,bytes); /* value data */
1572 @END
1575 /* Enumerate a value of a registry key */
1576 @REQ(enum_key_value)
1577 obj_handle_t hkey; /* handle to registry key */
1578 int index; /* value index */
1579 int info_class; /* requested information class */
1580 @REPLY
1581 int type; /* value type */
1582 data_size_t total; /* total length needed for full name and data */
1583 data_size_t namelen; /* length of value name in bytes */
1584 VARARG(name,unicode_str,namelen); /* value name */
1585 VARARG(data,bytes); /* value data */
1586 @END
1589 /* Delete a value of a registry key */
1590 @REQ(delete_key_value)
1591 obj_handle_t hkey; /* handle to registry key */
1592 VARARG(name,unicode_str); /* value name */
1593 @END
1596 /* Load a registry branch from a file */
1597 @REQ(load_registry)
1598 obj_handle_t hkey; /* root key to load to */
1599 obj_handle_t file; /* file to load from */
1600 VARARG(name,unicode_str); /* subkey name */
1601 @END
1604 /* UnLoad a registry branch from a file */
1605 @REQ(unload_registry)
1606 obj_handle_t hkey; /* root key to unload to */
1607 @END
1610 /* Save a registry branch to a file */
1611 @REQ(save_registry)
1612 obj_handle_t hkey; /* key to save */
1613 obj_handle_t file; /* file to save to */
1614 @END
1617 /* Add a registry key change notification */
1618 @REQ(set_registry_notification)
1619 obj_handle_t hkey; /* key to watch for changes */
1620 obj_handle_t event; /* event to set */
1621 int subtree; /* should we watch the whole subtree? */
1622 unsigned int filter; /* things to watch */
1623 @END
1626 /* Create a waitable timer */
1627 @REQ(create_timer)
1628 unsigned int access; /* wanted access rights */
1629 unsigned int attributes; /* object attributes */
1630 obj_handle_t rootdir; /* root directory */
1631 int manual; /* manual reset */
1632 VARARG(name,unicode_str); /* object name */
1633 @REPLY
1634 obj_handle_t handle; /* handle to the timer */
1635 @END
1638 /* Open a waitable timer */
1639 @REQ(open_timer)
1640 unsigned int access; /* wanted access rights */
1641 unsigned int attributes; /* object attributes */
1642 obj_handle_t rootdir; /* root directory */
1643 VARARG(name,unicode_str); /* object name */
1644 @REPLY
1645 obj_handle_t handle; /* handle to the timer */
1646 @END
1648 /* Set a waitable timer */
1649 @REQ(set_timer)
1650 obj_handle_t handle; /* handle to the timer */
1651 timeout_t expire; /* next expiration absolute time */
1652 int period; /* timer period in ms */
1653 void* callback; /* callback function */
1654 void* arg; /* callback argument */
1655 @REPLY
1656 int signaled; /* was the timer signaled before this call ? */
1657 @END
1659 /* Cancel a waitable timer */
1660 @REQ(cancel_timer)
1661 obj_handle_t handle; /* handle to the timer */
1662 @REPLY
1663 int signaled; /* was the timer signaled before this calltime ? */
1664 @END
1666 /* Get information on a waitable timer */
1667 @REQ(get_timer_info)
1668 obj_handle_t handle; /* handle to the timer */
1669 @REPLY
1670 timeout_t when; /* absolute time when the timer next expires */
1671 int signaled; /* is the timer signaled? */
1672 @END
1675 /* Retrieve the current context of a thread */
1676 @REQ(get_thread_context)
1677 obj_handle_t handle; /* thread handle */
1678 unsigned int flags; /* context flags */
1679 int suspend; /* if getting context during suspend */
1680 @REPLY
1681 int self; /* was it a handle to the current thread? */
1682 VARARG(context,context); /* thread context */
1683 @END
1686 /* Set the current context of a thread */
1687 @REQ(set_thread_context)
1688 obj_handle_t handle; /* thread handle */
1689 unsigned int flags; /* context flags */
1690 int suspend; /* if setting context during suspend */
1691 VARARG(context,context); /* thread context */
1692 @REPLY
1693 int self; /* was it a handle to the current thread? */
1694 @END
1697 /* Fetch a selector entry for a thread */
1698 @REQ(get_selector_entry)
1699 obj_handle_t handle; /* thread handle */
1700 int entry; /* LDT entry */
1701 @REPLY
1702 unsigned int base; /* selector base */
1703 unsigned int limit; /* selector limit */
1704 unsigned char flags; /* selector flags */
1705 @END
1708 /* Add an atom */
1709 @REQ(add_atom)
1710 obj_handle_t table; /* which table to add atom to */
1711 VARARG(name,unicode_str); /* atom name */
1712 @REPLY
1713 atom_t atom; /* resulting atom */
1714 @END
1717 /* Delete an atom */
1718 @REQ(delete_atom)
1719 obj_handle_t table; /* which table to delete atom from */
1720 atom_t atom; /* atom handle */
1721 @END
1724 /* Find an atom */
1725 @REQ(find_atom)
1726 obj_handle_t table; /* which table to find atom from */
1727 VARARG(name,unicode_str); /* atom name */
1728 @REPLY
1729 atom_t atom; /* atom handle */
1730 @END
1733 /* Get information about an atom */
1734 @REQ(get_atom_information)
1735 obj_handle_t table; /* which table to find atom from */
1736 atom_t atom; /* atom handle */
1737 @REPLY
1738 int count; /* atom lock count */
1739 int pinned; /* whether the atom has been pinned */
1740 data_size_t total; /* actual length of atom name */
1741 VARARG(name,unicode_str); /* atom name */
1742 @END
1745 /* Set information about an atom */
1746 @REQ(set_atom_information)
1747 obj_handle_t table; /* which table to find atom from */
1748 atom_t atom; /* atom handle */
1749 int pinned; /* whether to bump atom information */
1750 @END
1753 /* Empty an atom table */
1754 @REQ(empty_atom_table)
1755 obj_handle_t table; /* which table to find atom from */
1756 int if_pinned; /* whether to delete pinned atoms */
1757 @END
1760 /* Init an atom table */
1761 @REQ(init_atom_table)
1762 int entries; /* number of entries (only for local) */
1763 @REPLY
1764 obj_handle_t table; /* handle to the atom table */
1765 @END
1768 /* Get the message queue of the current thread */
1769 @REQ(get_msg_queue)
1770 @REPLY
1771 obj_handle_t handle; /* handle to the queue */
1772 @END
1775 /* Set the file descriptor associated to the current thread queue */
1776 @REQ(set_queue_fd)
1777 obj_handle_t handle; /* handle to the file descriptor */
1778 @END
1781 /* Set the current message queue wakeup mask */
1782 @REQ(set_queue_mask)
1783 unsigned int wake_mask; /* wakeup bits mask */
1784 unsigned int changed_mask; /* changed bits mask */
1785 int skip_wait; /* will we skip waiting if signaled? */
1786 @REPLY
1787 unsigned int wake_bits; /* current wake bits */
1788 unsigned int changed_bits; /* current changed bits */
1789 @END
1792 /* Get the current message queue status */
1793 @REQ(get_queue_status)
1794 int clear; /* should we clear the change bits? */
1795 @REPLY
1796 unsigned int wake_bits; /* wake bits */
1797 unsigned int changed_bits; /* changed bits since last time */
1798 @END
1801 /* Retrieve the process idle event */
1802 @REQ(get_process_idle_event)
1803 obj_handle_t handle; /* process handle */
1804 @REPLY
1805 obj_handle_t event; /* handle to idle event */
1806 @END
1809 /* Send a message to a thread queue */
1810 @REQ(send_message)
1811 thread_id_t id; /* thread id */
1812 int type; /* message type (see below) */
1813 int flags; /* message flags (see below) */
1814 user_handle_t win; /* window handle */
1815 unsigned int msg; /* message code */
1816 unsigned long wparam; /* parameters */
1817 unsigned long lparam; /* parameters */
1818 timeout_t timeout; /* timeout for reply */
1819 VARARG(data,message_data); /* message data for sent messages */
1820 @END
1822 @REQ(post_quit_message)
1823 int exit_code; /* exit code to return */
1824 @END
1826 enum message_type
1828 MSG_ASCII, /* Ascii message (from SendMessageA) */
1829 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1830 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1831 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1832 MSG_CALLBACK_RESULT,/* result of a callback message */
1833 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1834 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1835 MSG_HARDWARE, /* hardware message */
1836 MSG_WINEVENT /* winevent message */
1838 #define SEND_MSG_ABORT_IF_HUNG 0x01
1841 /* Send a hardware message to a thread queue */
1842 @REQ(send_hardware_message)
1843 thread_id_t id; /* thread id */
1844 user_handle_t win; /* window handle */
1845 unsigned int msg; /* message code */
1846 unsigned int time; /* message time */
1847 unsigned long wparam; /* parameters */
1848 unsigned long lparam; /* parameters */
1849 unsigned long info; /* extra info */
1850 int x; /* x position */
1851 int y; /* y position */
1852 @END
1855 /* Get a message from the current queue */
1856 @REQ(get_message)
1857 unsigned int flags; /* PM_* flags */
1858 user_handle_t get_win; /* window handle to get */
1859 unsigned int get_first; /* first message code to get */
1860 unsigned int get_last; /* last message code to get */
1861 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1862 unsigned int wake_mask; /* wakeup bits mask */
1863 unsigned int changed_mask; /* changed bits mask */
1864 @REPLY
1865 user_handle_t win; /* window handle */
1866 int type; /* message type */
1867 unsigned int msg; /* message code */
1868 unsigned long wparam; /* parameters */
1869 unsigned long lparam; /* parameters */
1870 unsigned long info; /* extra info */
1871 int x; /* x position */
1872 int y; /* y position */
1873 unsigned int time; /* message time */
1874 unsigned int hw_id; /* id if hardware message */
1875 unsigned int active_hooks; /* active hooks bitmap */
1876 data_size_t total; /* total size of extra data */
1877 VARARG(data,message_data); /* message data for sent messages */
1878 @END
1881 /* Reply to a sent message */
1882 @REQ(reply_message)
1883 unsigned long result; /* message result */
1884 int remove; /* should we remove the message? */
1885 VARARG(data,bytes); /* message data for sent messages */
1886 @END
1889 /* Accept the current hardware message */
1890 @REQ(accept_hardware_message)
1891 unsigned int hw_id; /* id of the hardware message */
1892 int remove; /* should we remove the message? */
1893 user_handle_t new_win; /* new destination window for current message */
1894 @END
1897 /* Retrieve the reply for the last message sent */
1898 @REQ(get_message_reply)
1899 int cancel; /* cancel message if not ready? */
1900 @REPLY
1901 unsigned long result; /* message result */
1902 VARARG(data,bytes); /* message data for sent messages */
1903 @END
1906 /* Set a window timer */
1907 @REQ(set_win_timer)
1908 user_handle_t win; /* window handle */
1909 unsigned int msg; /* message to post */
1910 unsigned int rate; /* timer rate in ms */
1911 unsigned long id; /* timer id */
1912 unsigned long lparam; /* message lparam (callback proc) */
1913 @REPLY
1914 unsigned long id; /* timer id */
1915 @END
1918 /* Kill a window timer */
1919 @REQ(kill_win_timer)
1920 user_handle_t win; /* window handle */
1921 unsigned int msg; /* message to post */
1922 unsigned long id; /* timer id */
1923 @END
1926 /* Retrieve info about a serial port */
1927 @REQ(get_serial_info)
1928 obj_handle_t handle; /* handle to comm port */
1929 @REPLY
1930 unsigned int readinterval;
1931 unsigned int readconst;
1932 unsigned int readmult;
1933 unsigned int writeconst;
1934 unsigned int writemult;
1935 unsigned int eventmask;
1936 @END
1939 /* Set info about a serial port */
1940 @REQ(set_serial_info)
1941 obj_handle_t handle; /* handle to comm port */
1942 int flags; /* bitmask to set values (see below) */
1943 unsigned int readinterval;
1944 unsigned int readconst;
1945 unsigned int readmult;
1946 unsigned int writeconst;
1947 unsigned int writemult;
1948 unsigned int eventmask;
1949 @END
1950 #define SERIALINFO_SET_TIMEOUTS 0x01
1951 #define SERIALINFO_SET_MASK 0x02
1954 /* Create an async I/O */
1955 @REQ(register_async)
1956 obj_handle_t handle; /* handle to comm port, socket or file */
1957 int type; /* type of queue to look after */
1958 int count; /* count - usually # of bytes to be read/written */
1959 async_data_t async; /* async I/O parameters */
1960 @END
1961 #define ASYNC_TYPE_READ 0x01
1962 #define ASYNC_TYPE_WRITE 0x02
1963 #define ASYNC_TYPE_WAIT 0x03
1966 /* Cancel all async op on a fd */
1967 @REQ(cancel_async)
1968 obj_handle_t handle; /* handle to comm port, socket or file */
1969 @END
1972 /* Perform an ioctl on a file */
1973 @REQ(ioctl)
1974 obj_handle_t handle; /* handle to the device */
1975 ioctl_code_t code; /* ioctl code */
1976 async_data_t async; /* async I/O parameters */
1977 VARARG(in_data,bytes); /* ioctl input data */
1978 @REPLY
1979 obj_handle_t wait; /* handle to wait on for blocking ioctl */
1980 unsigned int options; /* device open options */
1981 VARARG(out_data,bytes); /* ioctl output data */
1982 @END
1985 /* Retrieve results of an async ioctl */
1986 @REQ(get_ioctl_result)
1987 obj_handle_t handle; /* handle to the device */
1988 void* user_arg; /* user arg used to identify the request */
1989 @REPLY
1990 VARARG(out_data,bytes); /* ioctl output data */
1991 @END
1994 /* Create a named pipe */
1995 @REQ(create_named_pipe)
1996 unsigned int access;
1997 unsigned int attributes; /* object attributes */
1998 obj_handle_t rootdir; /* root directory */
1999 unsigned int options;
2000 unsigned int flags;
2001 unsigned int maxinstances;
2002 unsigned int outsize;
2003 unsigned int insize;
2004 timeout_t timeout;
2005 VARARG(name,unicode_str); /* pipe name */
2006 @REPLY
2007 obj_handle_t handle; /* handle to the pipe */
2008 @END
2010 /* flags in create_named_pipe and get_named_pipe_info */
2011 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2012 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2013 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2014 #define NAMED_PIPE_SERVER_END 0x8000
2017 @REQ(get_named_pipe_info)
2018 obj_handle_t handle;
2019 @REPLY
2020 unsigned int flags;
2021 unsigned int maxinstances;
2022 unsigned int instances;
2023 unsigned int outsize;
2024 unsigned int insize;
2025 @END
2028 /* Create a window */
2029 @REQ(create_window)
2030 user_handle_t parent; /* parent window */
2031 user_handle_t owner; /* owner window */
2032 atom_t atom; /* class atom */
2033 void* instance; /* module instance */
2034 VARARG(class,unicode_str); /* class name */
2035 @REPLY
2036 user_handle_t handle; /* created window */
2037 user_handle_t parent; /* full handle of parent */
2038 user_handle_t owner; /* full handle of owner */
2039 int extra; /* number of extra bytes */
2040 void* class_ptr; /* pointer to class in client address space */
2041 @END
2044 /* Destroy a window */
2045 @REQ(destroy_window)
2046 user_handle_t handle; /* handle to the window */
2047 @END
2050 /* Retrieve the desktop window for the current thread */
2051 @REQ(get_desktop_window)
2052 int force; /* force creation if it doesn't exist */
2053 @REPLY
2054 user_handle_t handle; /* handle to the desktop window */
2055 @END
2058 /* Set a window owner */
2059 @REQ(set_window_owner)
2060 user_handle_t handle; /* handle to the window */
2061 user_handle_t owner; /* new owner */
2062 @REPLY
2063 user_handle_t full_owner; /* full handle of new owner */
2064 user_handle_t prev_owner; /* full handle of previous owner */
2065 @END
2068 /* Get information from a window handle */
2069 @REQ(get_window_info)
2070 user_handle_t handle; /* handle to the window */
2071 @REPLY
2072 user_handle_t full_handle; /* full 32-bit handle */
2073 user_handle_t last_active; /* last active popup */
2074 process_id_t pid; /* process owning the window */
2075 thread_id_t tid; /* thread owning the window */
2076 atom_t atom; /* class atom */
2077 int is_unicode; /* ANSI or unicode */
2078 @END
2081 /* Set some information in a window */
2082 @REQ(set_window_info)
2083 unsigned int flags; /* flags for fields to set (see below) */
2084 user_handle_t handle; /* handle to the window */
2085 unsigned int style; /* window style */
2086 unsigned int ex_style; /* window extended style */
2087 unsigned int id; /* window id */
2088 int is_unicode; /* ANSI or unicode */
2089 void* instance; /* creator instance */
2090 unsigned long user_data; /* user-specific data */
2091 int extra_offset; /* offset to set in extra bytes */
2092 data_size_t extra_size; /* size to set in extra bytes */
2093 unsigned long extra_value; /* value to set in extra bytes */
2094 @REPLY
2095 unsigned int old_style; /* old window style */
2096 unsigned int old_ex_style; /* old window extended style */
2097 unsigned int old_id; /* old window id */
2098 void* old_instance; /* old creator instance */
2099 unsigned long old_user_data; /* old user-specific data */
2100 unsigned long old_extra_value; /* old value in extra bytes */
2101 @END
2102 #define SET_WIN_STYLE 0x01
2103 #define SET_WIN_EXSTYLE 0x02
2104 #define SET_WIN_ID 0x04
2105 #define SET_WIN_INSTANCE 0x08
2106 #define SET_WIN_USERDATA 0x10
2107 #define SET_WIN_EXTRA 0x20
2108 #define SET_WIN_UNICODE 0x40
2111 /* Set the parent of a window */
2112 @REQ(set_parent)
2113 user_handle_t handle; /* handle to the window */
2114 user_handle_t parent; /* handle to the parent */
2115 @REPLY
2116 user_handle_t old_parent; /* old parent window */
2117 user_handle_t full_parent; /* full handle of new parent */
2118 @END
2121 /* Get a list of the window parents, up to the root of the tree */
2122 @REQ(get_window_parents)
2123 user_handle_t handle; /* handle to the window */
2124 @REPLY
2125 int count; /* total count of parents */
2126 VARARG(parents,user_handles); /* parent handles */
2127 @END
2130 /* Get a list of the window children */
2131 @REQ(get_window_children)
2132 user_handle_t parent; /* parent window */
2133 atom_t atom; /* class atom for the listed children */
2134 thread_id_t tid; /* thread owning the listed children */
2135 VARARG(class,unicode_str); /* class name */
2136 @REPLY
2137 int count; /* total count of children */
2138 VARARG(children,user_handles); /* children handles */
2139 @END
2142 /* Get a list of the window children that contain a given point */
2143 @REQ(get_window_children_from_point)
2144 user_handle_t parent; /* parent window */
2145 int x; /* point in parent coordinates */
2146 int y;
2147 @REPLY
2148 int count; /* total count of children */
2149 VARARG(children,user_handles); /* children handles */
2150 @END
2153 /* Get window tree information from a window handle */
2154 @REQ(get_window_tree)
2155 user_handle_t handle; /* handle to the window */
2156 @REPLY
2157 user_handle_t parent; /* parent window */
2158 user_handle_t owner; /* owner window */
2159 user_handle_t next_sibling; /* next sibling in Z-order */
2160 user_handle_t prev_sibling; /* prev sibling in Z-order */
2161 user_handle_t first_sibling; /* first sibling in Z-order */
2162 user_handle_t last_sibling; /* last sibling in Z-order */
2163 user_handle_t first_child; /* first child */
2164 user_handle_t last_child; /* last child */
2165 @END
2167 /* Set the position and Z order of a window */
2168 @REQ(set_window_pos)
2169 unsigned int flags; /* SWP_* flags */
2170 user_handle_t handle; /* handle to the window */
2171 user_handle_t previous; /* previous window in Z order */
2172 rectangle_t window; /* window rectangle */
2173 rectangle_t client; /* client rectangle */
2174 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2175 @REPLY
2176 unsigned int new_style; /* new window style */
2177 unsigned int new_ex_style; /* new window extended style */
2178 @END
2181 /* Get the window and client rectangles of a window */
2182 @REQ(get_window_rectangles)
2183 user_handle_t handle; /* handle to the window */
2184 @REPLY
2185 rectangle_t window; /* window rectangle */
2186 rectangle_t visible; /* visible part of the window rectangle */
2187 rectangle_t client; /* client rectangle */
2188 @END
2191 /* Get the window text */
2192 @REQ(get_window_text)
2193 user_handle_t handle; /* handle to the window */
2194 @REPLY
2195 VARARG(text,unicode_str); /* window text */
2196 @END
2199 /* Set the window text */
2200 @REQ(set_window_text)
2201 user_handle_t handle; /* handle to the window */
2202 VARARG(text,unicode_str); /* window text */
2203 @END
2206 /* Get the coordinates offset between two windows */
2207 @REQ(get_windows_offset)
2208 user_handle_t from; /* handle to the first window */
2209 user_handle_t to; /* handle to the second window */
2210 @REPLY
2211 int x; /* x coordinate offset */
2212 int y; /* y coordinate offset */
2213 @END
2216 /* Get the visible region of a window */
2217 @REQ(get_visible_region)
2218 user_handle_t window; /* handle to the window */
2219 unsigned int flags; /* DCX flags */
2220 @REPLY
2221 user_handle_t top_win; /* top window to clip against */
2222 rectangle_t top_rect; /* top window visible rect with screen coords */
2223 rectangle_t win_rect; /* window rect in screen coords */
2224 data_size_t total_size; /* total size of the resulting region */
2225 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2226 @END
2229 /* Get the window region */
2230 @REQ(get_window_region)
2231 user_handle_t window; /* handle to the window */
2232 @REPLY
2233 data_size_t total_size; /* total size of the resulting region */
2234 VARARG(region,rectangles); /* list of rectangles for the region */
2235 @END
2238 /* Set the window region */
2239 @REQ(set_window_region)
2240 user_handle_t window; /* handle to the window */
2241 int redraw; /* redraw the window? */
2242 VARARG(region,rectangles); /* list of rectangles for the region */
2243 @END
2246 /* Get the window update region */
2247 @REQ(get_update_region)
2248 user_handle_t window; /* handle to the window */
2249 user_handle_t from_child; /* child to start searching from */
2250 unsigned int flags; /* update flags (see below) */
2251 @REPLY
2252 user_handle_t child; /* child to repaint (or window itself) */
2253 unsigned int flags; /* resulting update flags (see below) */
2254 data_size_t total_size; /* total size of the resulting region */
2255 VARARG(region,rectangles); /* list of rectangles for the region */
2256 @END
2257 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2258 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2259 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2260 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2261 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2262 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2263 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2264 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2267 /* Update the z order of a window so that a given rectangle is fully visible */
2268 @REQ(update_window_zorder)
2269 user_handle_t window; /* handle to the window */
2270 rectangle_t rect; /* rectangle that must be visible */
2271 @END
2274 /* Mark parts of a window as needing a redraw */
2275 @REQ(redraw_window)
2276 user_handle_t window; /* handle to the window */
2277 unsigned int flags; /* RDW_* flags */
2278 VARARG(region,rectangles); /* list of rectangles for the region */
2279 @END
2282 /* Set a window property */
2283 @REQ(set_window_property)
2284 user_handle_t window; /* handle to the window */
2285 atom_t atom; /* property atom (if no name specified) */
2286 obj_handle_t handle; /* handle to store */
2287 VARARG(name,unicode_str); /* property name */
2288 @END
2291 /* Remove a window property */
2292 @REQ(remove_window_property)
2293 user_handle_t window; /* handle to the window */
2294 atom_t atom; /* property atom (if no name specified) */
2295 VARARG(name,unicode_str); /* property name */
2296 @REPLY
2297 obj_handle_t handle; /* handle stored in property */
2298 @END
2301 /* Get a window property */
2302 @REQ(get_window_property)
2303 user_handle_t window; /* handle to the window */
2304 atom_t atom; /* property atom (if no name specified) */
2305 VARARG(name,unicode_str); /* property name */
2306 @REPLY
2307 obj_handle_t handle; /* handle stored in property */
2308 @END
2311 /* Get the list of properties of a window */
2312 @REQ(get_window_properties)
2313 user_handle_t window; /* handle to the window */
2314 @REPLY
2315 int total; /* total number of properties */
2316 VARARG(props,properties); /* list of properties */
2317 @END
2320 /* Create a window station */
2321 @REQ(create_winstation)
2322 unsigned int flags; /* window station flags */
2323 unsigned int access; /* wanted access rights */
2324 unsigned int attributes; /* object attributes */
2325 VARARG(name,unicode_str); /* object name */
2326 @REPLY
2327 obj_handle_t handle; /* handle to the window station */
2328 @END
2331 /* Open a handle to a window station */
2332 @REQ(open_winstation)
2333 unsigned int access; /* wanted access rights */
2334 unsigned int attributes; /* object attributes */
2335 VARARG(name,unicode_str); /* object name */
2336 @REPLY
2337 obj_handle_t handle; /* handle to the window station */
2338 @END
2341 /* Close a window station */
2342 @REQ(close_winstation)
2343 obj_handle_t handle; /* handle to the window station */
2344 @END
2347 /* Get the process current window station */
2348 @REQ(get_process_winstation)
2349 @REPLY
2350 obj_handle_t handle; /* handle to the window station */
2351 @END
2354 /* Set the process current window station */
2355 @REQ(set_process_winstation)
2356 obj_handle_t handle; /* handle to the window station */
2357 @END
2360 /* Create a desktop */
2361 @REQ(create_desktop)
2362 unsigned int flags; /* desktop flags */
2363 unsigned int access; /* wanted access rights */
2364 unsigned int attributes; /* object attributes */
2365 VARARG(name,unicode_str); /* object name */
2366 @REPLY
2367 obj_handle_t handle; /* handle to the desktop */
2368 @END
2371 /* Open a handle to a desktop */
2372 @REQ(open_desktop)
2373 unsigned int flags; /* desktop flags */
2374 unsigned int access; /* wanted access rights */
2375 unsigned int attributes; /* object attributes */
2376 VARARG(name,unicode_str); /* object name */
2377 @REPLY
2378 obj_handle_t handle; /* handle to the desktop */
2379 @END
2382 /* Close a desktop */
2383 @REQ(close_desktop)
2384 obj_handle_t handle; /* handle to the desktop */
2385 @END
2388 /* Get the thread current desktop */
2389 @REQ(get_thread_desktop)
2390 thread_id_t tid; /* thread id */
2391 @REPLY
2392 obj_handle_t handle; /* handle to the desktop */
2393 @END
2396 /* Set the thread current desktop */
2397 @REQ(set_thread_desktop)
2398 obj_handle_t handle; /* handle to the desktop */
2399 @END
2402 /* Get/set information about a user object (window station or desktop) */
2403 @REQ(set_user_object_info)
2404 obj_handle_t handle; /* handle to the object */
2405 unsigned int flags; /* information to set */
2406 unsigned int obj_flags; /* new object flags */
2407 @REPLY
2408 int is_desktop; /* is object a desktop? */
2409 unsigned int old_obj_flags; /* old object flags */
2410 VARARG(name,unicode_str); /* object name */
2411 @END
2412 #define SET_USER_OBJECT_FLAGS 1
2415 /* Attach (or detach) thread inputs */
2416 @REQ(attach_thread_input)
2417 thread_id_t tid_from; /* thread to be attached */
2418 thread_id_t tid_to; /* thread to which tid_from should be attached */
2419 int attach; /* is it an attach? */
2420 @END
2423 /* Get input data for a given thread */
2424 @REQ(get_thread_input)
2425 thread_id_t tid; /* id of thread */
2426 @REPLY
2427 user_handle_t focus; /* handle to the focus window */
2428 user_handle_t capture; /* handle to the capture window */
2429 user_handle_t active; /* handle to the active window */
2430 user_handle_t foreground; /* handle to the global foreground window */
2431 user_handle_t menu_owner; /* handle to the menu owner */
2432 user_handle_t move_size; /* handle to the moving/resizing window */
2433 user_handle_t caret; /* handle to the caret window */
2434 rectangle_t rect; /* caret rectangle */
2435 @END
2438 /* Get the time of the last input event */
2439 @REQ(get_last_input_time)
2440 @REPLY
2441 unsigned int time;
2442 @END
2445 /* Retrieve queue keyboard state for a given thread */
2446 @REQ(get_key_state)
2447 thread_id_t tid; /* id of thread */
2448 int key; /* optional key code or -1 */
2449 @REPLY
2450 unsigned char state; /* state of specified key */
2451 VARARG(keystate,bytes); /* state array for all the keys */
2452 @END
2454 /* Set queue keyboard state for a given thread */
2455 @REQ(set_key_state)
2456 thread_id_t tid; /* id of thread */
2457 VARARG(keystate,bytes); /* state array for all the keys */
2458 @END
2460 /* Set the system foreground window */
2461 @REQ(set_foreground_window)
2462 user_handle_t handle; /* handle to the foreground window */
2463 @REPLY
2464 user_handle_t previous; /* handle to the previous foreground window */
2465 int send_msg_old; /* whether we have to send a msg to the old window */
2466 int send_msg_new; /* whether we have to send a msg to the new window */
2467 @END
2469 /* Set the current thread focus window */
2470 @REQ(set_focus_window)
2471 user_handle_t handle; /* handle to the focus window */
2472 @REPLY
2473 user_handle_t previous; /* handle to the previous focus window */
2474 @END
2476 /* Set the current thread active window */
2477 @REQ(set_active_window)
2478 user_handle_t handle; /* handle to the active window */
2479 @REPLY
2480 user_handle_t previous; /* handle to the previous active window */
2481 @END
2483 /* Set the current thread capture window */
2484 @REQ(set_capture_window)
2485 user_handle_t handle; /* handle to the capture window */
2486 unsigned int flags; /* capture flags (see below) */
2487 @REPLY
2488 user_handle_t previous; /* handle to the previous capture window */
2489 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2490 @END
2491 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2492 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2495 /* Set the current thread caret window */
2496 @REQ(set_caret_window)
2497 user_handle_t handle; /* handle to the caret window */
2498 int width; /* caret width */
2499 int height; /* caret height */
2500 @REPLY
2501 user_handle_t previous; /* handle to the previous caret window */
2502 rectangle_t old_rect; /* previous caret rectangle */
2503 int old_hide; /* previous hide count */
2504 int old_state; /* previous caret state (1=on, 0=off) */
2505 @END
2508 /* Set the current thread caret information */
2509 @REQ(set_caret_info)
2510 unsigned int flags; /* caret flags (see below) */
2511 user_handle_t handle; /* handle to the caret window */
2512 int x; /* caret x position */
2513 int y; /* caret y position */
2514 int hide; /* increment for hide count (can be negative to show it) */
2515 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2516 @REPLY
2517 user_handle_t full_handle; /* handle to the current caret window */
2518 rectangle_t old_rect; /* previous caret rectangle */
2519 int old_hide; /* previous hide count */
2520 int old_state; /* previous caret state (1=on, 0=off) */
2521 @END
2522 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2523 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2524 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2527 /* Set a window hook */
2528 @REQ(set_hook)
2529 int id; /* id of the hook */
2530 process_id_t pid; /* id of process to set the hook into */
2531 thread_id_t tid; /* id of thread to set the hook into */
2532 int event_min;
2533 int event_max;
2534 int flags;
2535 void* proc; /* hook procedure */
2536 int unicode; /* is it a unicode hook? */
2537 VARARG(module,unicode_str); /* module name */
2538 @REPLY
2539 user_handle_t handle; /* handle to the hook */
2540 unsigned int active_hooks; /* active hooks bitmap */
2541 @END
2544 /* Remove a window hook */
2545 @REQ(remove_hook)
2546 user_handle_t handle; /* handle to the hook */
2547 int id; /* id of the hook if handle is 0 */
2548 void* proc; /* hook procedure if handle is 0 */
2549 @REPLY
2550 unsigned int active_hooks; /* active hooks bitmap */
2551 @END
2554 /* Start calling a hook chain */
2555 @REQ(start_hook_chain)
2556 int id; /* id of the hook */
2557 int event; /* signalled event */
2558 user_handle_t window; /* handle to the event window */
2559 int object_id; /* object id for out of context winevent */
2560 int child_id; /* child id for out of context winevent */
2561 @REPLY
2562 user_handle_t handle; /* handle to the next hook */
2563 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2564 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2565 void* proc; /* hook procedure */
2566 int unicode; /* is it a unicode hook? */
2567 unsigned int active_hooks; /* active hooks bitmap */
2568 VARARG(module,unicode_str); /* module name */
2569 @END
2572 /* Finished calling a hook chain */
2573 @REQ(finish_hook_chain)
2574 int id; /* id of the hook */
2575 @END
2578 /* Get the hook information */
2579 @REQ(get_hook_info)
2580 user_handle_t handle; /* handle to the current hook */
2581 int get_next; /* do we want info about current or next hook? */
2582 int event; /* signalled event */
2583 user_handle_t window; /* handle to the event window */
2584 int object_id; /* object id for out of context winevent */
2585 int child_id; /* child id for out of context winevent */
2586 @REPLY
2587 user_handle_t handle; /* handle to the hook */
2588 int id; /* id of the hook */
2589 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2590 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2591 void* proc; /* hook procedure */
2592 int unicode; /* is it a unicode hook? */
2593 VARARG(module,unicode_str); /* module name */
2594 @END
2597 /* Create a window class */
2598 @REQ(create_class)
2599 int local; /* is it a local class? */
2600 atom_t atom; /* class atom */
2601 unsigned int style; /* class style */
2602 void* instance; /* module instance */
2603 int extra; /* number of extra class bytes */
2604 int win_extra; /* number of window extra bytes */
2605 void* client_ptr; /* pointer to class in client address space */
2606 VARARG(name,unicode_str); /* class name */
2607 @REPLY
2608 atom_t atom; /* resulting class atom */
2609 @END
2612 /* Destroy a window class */
2613 @REQ(destroy_class)
2614 atom_t atom; /* class atom */
2615 void* instance; /* module instance */
2616 VARARG(name,unicode_str); /* class name */
2617 @REPLY
2618 void* client_ptr; /* pointer to class in client address space */
2619 @END
2622 /* Set some information in a class */
2623 @REQ(set_class_info)
2624 user_handle_t window; /* handle to the window */
2625 unsigned int flags; /* flags for info to set (see below) */
2626 atom_t atom; /* class atom */
2627 unsigned int style; /* class style */
2628 int win_extra; /* number of window extra bytes */
2629 void* instance; /* module instance */
2630 int extra_offset; /* offset to set in extra bytes */
2631 data_size_t extra_size; /* size to set in extra bytes */
2632 unsigned long extra_value; /* value to set in extra bytes */
2633 @REPLY
2634 atom_t old_atom; /* previous class atom */
2635 unsigned int old_style; /* previous class style */
2636 int old_extra; /* previous number of class extra bytes */
2637 int old_win_extra; /* previous number of window extra bytes */
2638 void* old_instance; /* previous module instance */
2639 unsigned long old_extra_value; /* old value in extra bytes */
2640 @END
2641 #define SET_CLASS_ATOM 0x0001
2642 #define SET_CLASS_STYLE 0x0002
2643 #define SET_CLASS_WINEXTRA 0x0004
2644 #define SET_CLASS_INSTANCE 0x0008
2645 #define SET_CLASS_EXTRA 0x0010
2648 /* Set/get clipboard information */
2649 @REQ(set_clipboard_info)
2650 unsigned int flags; /* flags for fields to set (see below) */
2651 user_handle_t clipboard; /* clipboard window */
2652 user_handle_t owner; /* clipboard owner */
2653 user_handle_t viewer; /* first clipboard viewer */
2654 unsigned int seqno; /* change sequence number */
2655 @REPLY
2656 unsigned int flags; /* status flags (see below) */
2657 user_handle_t old_clipboard; /* old clipboard window */
2658 user_handle_t old_owner; /* old clipboard owner */
2659 user_handle_t old_viewer; /* old clipboard viewer */
2660 unsigned int seqno; /* current sequence number */
2661 @END
2663 #define SET_CB_OPEN 0x001
2664 #define SET_CB_OWNER 0x002
2665 #define SET_CB_VIEWER 0x004
2666 #define SET_CB_SEQNO 0x008
2667 #define SET_CB_RELOWNER 0x010
2668 #define SET_CB_CLOSE 0x020
2669 #define CB_OPEN 0x040
2670 #define CB_OWNER 0x080
2671 #define CB_PROCESS 0x100
2674 /* Open a security token */
2675 @REQ(open_token)
2676 obj_handle_t handle; /* handle to the thread or process */
2677 unsigned int access; /* access rights to the new token */
2678 unsigned int attributes;/* object attributes */
2679 unsigned int flags; /* flags (see below) */
2680 @REPLY
2681 obj_handle_t token; /* handle to the token */
2682 @END
2683 #define OPEN_TOKEN_THREAD 1
2684 #define OPEN_TOKEN_AS_SELF 2
2687 /* Set/get the global windows */
2688 @REQ(set_global_windows)
2689 unsigned int flags; /* flags for fields to set (see below) */
2690 user_handle_t shell_window; /* handle to the new shell window */
2691 user_handle_t shell_listview; /* handle to the new shell listview window */
2692 user_handle_t progman_window; /* handle to the new program manager window */
2693 user_handle_t taskman_window; /* handle to the new task manager window */
2694 @REPLY
2695 user_handle_t old_shell_window; /* handle to the shell window */
2696 user_handle_t old_shell_listview; /* handle to the shell listview window */
2697 user_handle_t old_progman_window; /* handle to the new program manager window */
2698 user_handle_t old_taskman_window; /* handle to the new task manager window */
2699 @END
2700 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2701 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2702 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2704 /* Adjust the privileges held by a token */
2705 @REQ(adjust_token_privileges)
2706 obj_handle_t handle; /* handle to the token */
2707 int disable_all; /* disable all privileges? */
2708 int get_modified_state; /* get modified privileges? */
2709 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2710 @REPLY
2711 unsigned int len; /* total length in bytes required to store token privileges */
2712 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2713 @END
2715 /* Retrieves the set of privileges held by or available to a token */
2716 @REQ(get_token_privileges)
2717 obj_handle_t handle; /* handle to the token */
2718 @REPLY
2719 unsigned int len; /* total length in bytes required to store token privileges */
2720 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2721 @END
2723 /* Check the token has the required privileges */
2724 @REQ(check_token_privileges)
2725 obj_handle_t handle; /* handle to the token */
2726 int all_required; /* are all the privileges required for the check to succeed? */
2727 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2728 @REPLY
2729 int has_privileges; /* does the token have the required privileges? */
2730 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2731 @END
2733 @REQ(duplicate_token)
2734 obj_handle_t handle; /* handle to the token to duplicate */
2735 unsigned int access; /* access rights to the new token */
2736 unsigned int attributes; /* object attributes */
2737 int primary; /* is the new token to be a primary one? */
2738 int impersonation_level; /* impersonation level of the new token */
2739 @REPLY
2740 obj_handle_t new_handle; /* duplicated handle */
2741 @END
2743 @REQ(access_check)
2744 obj_handle_t handle; /* handle to the token */
2745 unsigned int desired_access; /* desired access to the object */
2746 unsigned int mapping_read; /* mapping from generic read to specific rights */
2747 unsigned int mapping_write; /* mapping from generic write to specific rights */
2748 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2749 unsigned int mapping_all; /* mapping from generic all to specific rights */
2750 VARARG(sd,security_descriptor); /* security descriptor to check */
2751 @REPLY
2752 unsigned int access_granted; /* access rights actually granted */
2753 unsigned int access_status; /* was access granted? */
2754 unsigned int privileges_len; /* length needed to store privileges */
2755 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2756 @END
2758 @REQ(get_token_user)
2759 obj_handle_t handle; /* handle to the token */
2760 @REPLY
2761 data_size_t user_len; /* length needed to store user */
2762 VARARG(user,SID); /* sid of the user the token represents */
2763 @END
2765 @REQ(get_token_groups)
2766 obj_handle_t handle; /* handle to the token */
2767 @REPLY
2768 data_size_t user_len; /* length needed to store user */
2769 VARARG(user,token_groups); /* groups the token's user belongs to */
2770 @END
2772 @REQ(set_security_object)
2773 obj_handle_t handle; /* handle to the object */
2774 unsigned int security_info; /* which parts of security descriptor to set */
2775 VARARG(sd,security_descriptor); /* security descriptor to set */
2776 @END
2778 @REQ(get_security_object)
2779 obj_handle_t handle; /* handle to the object */
2780 unsigned int security_info; /* which parts of security descriptor to get */
2781 @REPLY
2782 unsigned int sd_len; /* buffer size needed for sd */
2783 VARARG(sd,security_descriptor); /* retrieved security descriptor */
2784 @END
2786 /* Create a mailslot */
2787 @REQ(create_mailslot)
2788 unsigned int access; /* wanted access rights */
2789 unsigned int attributes; /* object attributes */
2790 obj_handle_t rootdir; /* root directory */
2791 unsigned int max_msgsize;
2792 timeout_t read_timeout;
2793 VARARG(name,unicode_str); /* mailslot name */
2794 @REPLY
2795 obj_handle_t handle; /* handle to the mailslot */
2796 @END
2799 /* Set mailslot information */
2800 @REQ(set_mailslot_info)
2801 obj_handle_t handle; /* handle to the mailslot */
2802 unsigned int flags;
2803 timeout_t read_timeout;
2804 @REPLY
2805 unsigned int max_msgsize;
2806 timeout_t read_timeout;
2807 @END
2808 #define MAILSLOT_SET_READ_TIMEOUT 1
2811 /* Create a directory object */
2812 @REQ(create_directory)
2813 unsigned int access; /* access flags */
2814 unsigned int attributes; /* object attributes */
2815 obj_handle_t rootdir; /* root directory */
2816 VARARG(directory_name,unicode_str); /* Directory name */
2817 @REPLY
2818 obj_handle_t handle; /* handle to the directory */
2819 @END
2822 /* Open a directory object */
2823 @REQ(open_directory)
2824 unsigned int access; /* access flags */
2825 unsigned int attributes; /* object attributes */
2826 obj_handle_t rootdir; /* root directory */
2827 VARARG(directory_name,unicode_str); /* Directory name */
2828 @REPLY
2829 obj_handle_t handle; /* handle to the directory */
2830 @END
2833 /* Create a symbolic link object */
2834 @REQ(create_symlink)
2835 unsigned int access; /* access flags */
2836 unsigned int attributes; /* object attributes */
2837 obj_handle_t rootdir; /* root directory */
2838 data_size_t name_len; /* length of the symlink name in bytes */
2839 VARARG(name,unicode_str,name_len); /* symlink name */
2840 VARARG(target_name,unicode_str); /* target name */
2841 @REPLY
2842 obj_handle_t handle; /* handle to the symlink */
2843 @END
2846 /* Open a symbolic link object */
2847 @REQ(open_symlink)
2848 unsigned int access; /* access flags */
2849 unsigned int attributes; /* object attributes */
2850 obj_handle_t rootdir; /* root directory */
2851 VARARG(name,unicode_str); /* symlink name */
2852 @REPLY
2853 obj_handle_t handle; /* handle to the symlink */
2854 @END
2857 /* Query a symbolic link object */
2858 @REQ(query_symlink)
2859 obj_handle_t handle; /* handle to the symlink */
2860 @REPLY
2861 VARARG(target_name,unicode_str); /* target name */
2862 @END
2865 /* Query basic object information */
2866 @REQ(get_object_info)
2867 obj_handle_t handle; /* handle to the object */
2868 @REPLY
2869 unsigned int access; /* granted access mask */
2870 unsigned int ref_count; /* object ref count */
2871 @END
2873 /* Query the impersonation level of an impersonation token */
2874 @REQ(get_token_impersonation_level)
2875 obj_handle_t handle; /* handle to the object */
2876 @REPLY
2877 int impersonation_level; /* impersonation level of the impersonation token */
2878 @END
2880 /* Allocate a locally-unique identifier */
2881 @REQ(allocate_locally_unique_id)
2882 @REPLY
2883 luid_t luid;
2884 @END
2887 /* Create a device manager */
2888 @REQ(create_device_manager)
2889 unsigned int access; /* wanted access rights */
2890 unsigned int attributes; /* object attributes */
2891 @REPLY
2892 obj_handle_t handle; /* handle to the device */
2893 @END
2896 /* Create a device */
2897 @REQ(create_device)
2898 unsigned int access; /* wanted access rights */
2899 unsigned int attributes; /* object attributes */
2900 obj_handle_t rootdir; /* root directory */
2901 obj_handle_t manager; /* device manager */
2902 void* user_ptr; /* opaque ptr for use by client */
2903 VARARG(name,unicode_str); /* object name */
2904 @REPLY
2905 obj_handle_t handle; /* handle to the device */
2906 @END
2909 /* Delete a device */
2910 @REQ(delete_device)
2911 obj_handle_t handle; /* handle to the device */
2912 @END
2915 /* Retrieve the next pending device ioctl request */
2916 @REQ(get_next_device_request)
2917 obj_handle_t manager; /* handle to the device manager */
2918 obj_handle_t prev; /* handle to the previous ioctl */
2919 unsigned int status; /* status of the previous ioctl */
2920 VARARG(prev_data,bytes); /* output data of the previous ioctl */
2921 @REPLY
2922 obj_handle_t next; /* handle to the next ioctl */
2923 ioctl_code_t code; /* ioctl code */
2924 void* user_ptr; /* opaque ptr for the device */
2925 data_size_t in_size; /* total needed input size */
2926 data_size_t out_size; /* needed output size */
2927 VARARG(next_data,bytes); /* input data of the next ioctl */
2928 @END
2931 /* Make the current process a system process */
2932 @REQ(make_process_system)
2933 @REPLY
2934 obj_handle_t event; /* event signaled when all user processes have exited */
2935 @END
2938 /* Get detailed fixed-size information about a token */
2939 @REQ(get_token_statistics)
2940 obj_handle_t handle; /* handle to the object */
2941 @REPLY
2942 luid_t token_id; /* locally-unique identifier of the token */
2943 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
2944 int primary; /* is the token primary or impersonation? */
2945 int impersonation_level; /* level of impersonation */
2946 int group_count; /* the number of groups the token is a member of */
2947 int privilege_count; /* the number of privileges the token has */
2948 @END
2951 /* Create I/O completion port */
2952 @REQ(create_completion)
2953 unsigned int access; /* desired access to a port */
2954 unsigned int attributes; /* object attributes */
2955 unsigned int concurrent; /* max number of concurrent active threads */
2956 obj_handle_t rootdir; /* root directory */
2957 VARARG(filename,string); /* port name */
2958 @REPLY
2959 obj_handle_t handle; /* port handle */
2960 @END
2963 /* Open I/O completion port */
2964 @REQ(open_completion)
2965 unsigned int access; /* desired access to a port */
2966 unsigned int attributes; /* object attributes */
2967 obj_handle_t rootdir; /* root directory */
2968 VARARG(filename,string); /* port name */
2969 @REPLY
2970 obj_handle_t handle; /* port handle */
2971 @END
2974 /* add completion to completion port */
2975 @REQ(add_completion)
2976 obj_handle_t handle; /* port handle */
2977 unsigned long ckey; /* completion key */
2978 unsigned long cvalue; /* completion value */
2979 unsigned long information; /* IO_STATUS_BLOCK Information */
2980 unsigned int status; /* completion result */
2981 @END
2984 /* get completion from completion port queue */
2985 @REQ(remove_completion)
2986 obj_handle_t handle; /* port handle */
2987 @REPLY
2988 unsigned long ckey; /* completion key */
2989 unsigned long cvalue; /* completion value */
2990 unsigned long information; /* IO_STATUS_BLOCK Information */
2991 unsigned int status; /* completion result */
2992 @END
2995 /* get completion queue depth */
2996 @REQ(query_completion)
2997 obj_handle_t handle; /* port handle */
2998 @REPLY
2999 unsigned int depth; /* completion queue depth */
3000 @END
3003 /* associate object with completion port */
3004 @REQ(set_completion_info)
3005 obj_handle_t handle; /* object handle */
3006 obj_handle_t chandle; /* port handle */
3007 unsigned long ckey; /* completion key */
3008 @END