push 583922ece91f6a3e6a32c772f3574cd16e6257fa
[wine/hacks.git] / server / protocol.def
blobc9da74a7cef92382fa11e197641c2fb9a71ff522
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 } async_data_t;
184 /* structures for extra message data */
186 struct callback_msg_data
188 void *callback; /* callback function */
189 unsigned long data; /* user data for callback */
190 unsigned long result; /* message result */
193 struct winevent_msg_data
195 user_handle_t hook; /* hook handle */
196 thread_id_t tid; /* thread id */
197 void *hook_proc; /* hook proc address */
198 /* followed by module name if any */
201 typedef union
203 unsigned char bytes[1]; /* raw data for sent messages */
204 struct callback_msg_data callback;
205 struct winevent_msg_data winevent;
206 } message_data_t;
208 /* structure for console char/attribute info */
209 typedef struct
211 WCHAR ch;
212 unsigned short attr;
213 } char_info_t;
215 typedef struct
217 unsigned int low_part;
218 int high_part;
219 } luid_t;
221 #define MAX_ACL_LEN 65535
223 struct security_descriptor
225 unsigned int control; /* SE_ flags */
226 data_size_t owner_len;
227 data_size_t group_len;
228 data_size_t sacl_len;
229 data_size_t dacl_len;
230 /* VARARGS(owner,SID); */
231 /* VARARGS(group,SID); */
232 /* VARARGS(sacl,ACL); */
233 /* VARARGS(dacl,ACL); */
236 struct token_groups
238 unsigned int count;
239 /* unsigned int attributes[count]; */
240 /* VARARGS(sids,SID); */
243 enum apc_type
245 APC_NONE,
246 APC_USER,
247 APC_TIMER,
248 APC_ASYNC_IO,
249 APC_VIRTUAL_ALLOC,
250 APC_VIRTUAL_FREE,
251 APC_VIRTUAL_QUERY,
252 APC_VIRTUAL_PROTECT,
253 APC_VIRTUAL_FLUSH,
254 APC_VIRTUAL_LOCK,
255 APC_VIRTUAL_UNLOCK,
256 APC_MAP_VIEW,
257 APC_UNMAP_VIEW,
258 APC_CREATE_THREAD
261 typedef union
263 enum apc_type type;
264 struct
266 enum apc_type type; /* APC_USER */
267 void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
268 unsigned long args[3]; /* arguments for user function */
269 } user;
270 struct
272 enum apc_type type; /* APC_TIMER */
273 void (__stdcall *func)(void*, unsigned int, unsigned int);
274 timeout_t time; /* absolute time of expiration */
275 void *arg; /* user argument */
276 } timer;
277 struct
279 enum apc_type type; /* APC_ASYNC_IO */
280 unsigned int (*func)(void*, void*, unsigned int);
281 void *user; /* user pointer */
282 void *sb; /* status block */
283 unsigned int status; /* I/O status */
284 } async_io;
285 struct
287 enum apc_type type; /* APC_VIRTUAL_ALLOC */
288 void *addr; /* requested address */
289 unsigned long size; /* allocation size */
290 unsigned int zero_bits; /* allocation alignment */
291 unsigned int op_type; /* type of operation */
292 unsigned int prot; /* memory protection flags */
293 } virtual_alloc;
294 struct
296 enum apc_type type; /* APC_VIRTUAL_FREE */
297 void *addr; /* requested address */
298 unsigned long size; /* allocation size */
299 unsigned int op_type; /* type of operation */
300 } virtual_free;
301 struct
303 enum apc_type type; /* APC_VIRTUAL_QUERY */
304 const void *addr; /* requested address */
305 } virtual_query;
306 struct
308 enum apc_type type; /* APC_VIRTUAL_PROTECT */
309 void *addr; /* requested address */
310 unsigned long size; /* requested address */
311 unsigned int prot; /* new protection flags */
312 } virtual_protect;
313 struct
315 enum apc_type type; /* APC_VIRTUAL_FLUSH */
316 const void *addr; /* requested address */
317 unsigned long size; /* requested address */
318 } virtual_flush;
319 struct
321 enum apc_type type; /* APC_VIRTUAL_LOCK */
322 void *addr; /* requested address */
323 unsigned long size; /* requested address */
324 } virtual_lock;
325 struct
327 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
328 void *addr; /* requested address */
329 unsigned long size; /* requested address */
330 } virtual_unlock;
331 struct
333 enum apc_type type; /* APC_MAP_VIEW */
334 obj_handle_t handle; /* mapping handle */
335 void *addr; /* requested address */
336 unsigned long size; /* allocation size */
337 file_pos_t offset; /* file offset */
338 unsigned int zero_bits; /* allocation alignment */
339 unsigned int alloc_type;/* allocation type */
340 unsigned int prot; /* memory protection flags */
341 } map_view;
342 struct
344 enum apc_type type; /* APC_UNMAP_VIEW */
345 void *addr; /* view address */
346 } unmap_view;
347 struct
349 enum apc_type type; /* APC_CREATE_THREAD */
350 void (__stdcall *func)(void*); /* start function */
351 void *arg; /* argument for start function */
352 unsigned long reserve; /* reserve size for thread stack */
353 unsigned long commit; /* commit size for thread stack */
354 int suspend; /* suspended thread? */
355 } create_thread;
356 } apc_call_t;
358 typedef union
360 enum apc_type type;
361 struct
363 enum apc_type type; /* APC_ASYNC_IO */
364 unsigned int status; /* new status of async operation */
365 } async_io;
366 struct
368 enum apc_type type; /* APC_VIRTUAL_ALLOC */
369 unsigned int status; /* status returned by call */
370 void *addr; /* resulting address */
371 unsigned long size; /* resulting size */
372 } virtual_alloc;
373 struct
375 enum apc_type type; /* APC_VIRTUAL_FREE */
376 unsigned int status; /* status returned by call */
377 void *addr; /* resulting address */
378 unsigned long size; /* resulting size */
379 } virtual_free;
380 struct
382 enum apc_type type; /* APC_VIRTUAL_QUERY */
383 unsigned int status; /* status returned by call */
384 void *base; /* resulting base address */
385 void *alloc_base;/* resulting allocation base */
386 unsigned long size; /* resulting region size */
387 unsigned int state; /* resulting region state */
388 unsigned int prot; /* resulting region protection */
389 unsigned int alloc_prot;/* resulting allocation protection */
390 unsigned int alloc_type;/* resulting region allocation type */
391 } virtual_query;
392 struct
394 enum apc_type type; /* APC_VIRTUAL_PROTECT */
395 unsigned int status; /* status returned by call */
396 void *addr; /* resulting address */
397 unsigned long size; /* resulting size */
398 unsigned int prot; /* old protection flags */
399 } virtual_protect;
400 struct
402 enum apc_type type; /* APC_VIRTUAL_FLUSH */
403 unsigned int status; /* status returned by call */
404 const void *addr; /* resulting address */
405 unsigned long size; /* resulting size */
406 } virtual_flush;
407 struct
409 enum apc_type type; /* APC_VIRTUAL_LOCK */
410 unsigned int status; /* status returned by call */
411 void *addr; /* resulting address */
412 unsigned long size; /* resulting size */
413 } virtual_lock;
414 struct
416 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
417 unsigned int status; /* status returned by call */
418 void *addr; /* resulting address */
419 unsigned long size; /* resulting size */
420 } virtual_unlock;
421 struct
423 enum apc_type type; /* APC_MAP_VIEW */
424 unsigned int status; /* status returned by call */
425 void *addr; /* resulting address */
426 unsigned long size; /* resulting size */
427 } map_view;
428 struct
430 enum apc_type type; /* APC_MAP_VIEW */
431 unsigned int status; /* status returned by call */
432 } unmap_view;
433 struct
435 enum apc_type type; /* APC_CREATE_THREAD */
436 unsigned int status; /* status returned by call */
437 thread_id_t tid; /* thread id */
438 obj_handle_t handle; /* handle to new thread */
439 } create_thread;
440 } apc_result_t;
442 /****************************************************************/
443 /* Request declarations */
445 /* Create a new process from the context of the parent */
446 @REQ(new_process)
447 int inherit_all; /* inherit all handles from parent */
448 unsigned int create_flags; /* creation flags */
449 int socket_fd; /* file descriptor for process socket */
450 obj_handle_t exe_file; /* file handle for main exe */
451 obj_handle_t hstdin; /* handle for stdin */
452 obj_handle_t hstdout; /* handle for stdout */
453 obj_handle_t hstderr; /* handle for stderr */
454 unsigned int process_access; /* access rights for process object */
455 unsigned int process_attr; /* attributes for process object */
456 unsigned int thread_access; /* access rights for thread object */
457 unsigned int thread_attr; /* attributes for thread object */
458 VARARG(info,startup_info); /* startup information */
459 VARARG(env,unicode_str); /* environment for new process */
460 @REPLY
461 obj_handle_t info; /* new process info handle */
462 process_id_t pid; /* process id */
463 obj_handle_t phandle; /* process handle (in the current process) */
464 thread_id_t tid; /* thread id */
465 obj_handle_t thandle; /* thread handle (in the current process) */
466 @END
469 /* Retrieve information about a newly started process */
470 @REQ(get_new_process_info)
471 obj_handle_t info; /* info handle returned from new_process_request */
472 @REPLY
473 int success; /* did the process start successfully? */
474 int exit_code; /* process exit code if failed */
475 @END
478 /* Create a new thread from the context of the parent */
479 @REQ(new_thread)
480 unsigned int access; /* wanted access rights */
481 unsigned int attributes; /* object attributes */
482 int suspend; /* new thread should be suspended on creation */
483 int request_fd; /* fd for request pipe */
484 @REPLY
485 thread_id_t tid; /* thread id */
486 obj_handle_t handle; /* thread handle (in the current process) */
487 @END
490 /* Retrieve the new process startup info */
491 @REQ(get_startup_info)
492 @REPLY
493 obj_handle_t exe_file; /* file handle for main exe */
494 obj_handle_t hstdin; /* handle for stdin */
495 obj_handle_t hstdout; /* handle for stdout */
496 obj_handle_t hstderr; /* handle for stderr */
497 VARARG(info,startup_info); /* startup information */
498 VARARG(env,unicode_str); /* environment */
499 @END
502 /* Signal the end of the process initialization */
503 @REQ(init_process_done)
504 void* module; /* main module base address */
505 void* entry; /* process entry point */
506 int gui; /* is it a GUI process? */
507 @END
510 /* Initialize a thread; called from the child after fork()/clone() */
511 @REQ(init_thread)
512 int unix_pid; /* Unix pid of new thread */
513 int unix_tid; /* Unix tid of new thread */
514 int debug_level; /* new debug level */
515 void* teb; /* TEB of new thread (in thread address space) */
516 void* peb; /* address of PEB (in thread address space) */
517 void* entry; /* thread entry point (in thread address space) */
518 void* ldt_copy; /* address of LDT copy (in thread address space) */
519 int reply_fd; /* fd for reply pipe */
520 int wait_fd; /* fd for blocking calls pipe */
521 @REPLY
522 process_id_t pid; /* process id of the new thread's process */
523 thread_id_t tid; /* thread id of the new thread */
524 data_size_t info_size; /* total size of startup info */
525 timeout_t server_start; /* server start time */
526 int version; /* protocol version */
527 @END
530 /* Terminate a process */
531 @REQ(terminate_process)
532 obj_handle_t handle; /* process handle to terminate */
533 int exit_code; /* process exit code */
534 @REPLY
535 int self; /* suicide? */
536 @END
539 /* Terminate a thread */
540 @REQ(terminate_thread)
541 obj_handle_t handle; /* thread handle to terminate */
542 int exit_code; /* thread exit code */
543 @REPLY
544 int self; /* suicide? */
545 int last; /* last thread in this process? */
546 @END
549 /* Retrieve information about a process */
550 @REQ(get_process_info)
551 obj_handle_t handle; /* process handle */
552 @REPLY
553 process_id_t pid; /* server process id */
554 process_id_t ppid; /* server process id of parent */
555 int exit_code; /* process exit code */
556 int priority; /* priority class */
557 int affinity; /* process affinity mask */
558 void* peb; /* PEB address in process address space */
559 timeout_t start_time; /* process start time */
560 timeout_t end_time; /* process end time */
561 @END
564 /* Set a process informations */
565 @REQ(set_process_info)
566 obj_handle_t handle; /* process handle */
567 int mask; /* setting mask (see below) */
568 int priority; /* priority class */
569 int affinity; /* affinity mask */
570 @END
571 #define SET_PROCESS_INFO_PRIORITY 0x01
572 #define SET_PROCESS_INFO_AFFINITY 0x02
575 /* Retrieve information about a thread */
576 @REQ(get_thread_info)
577 obj_handle_t handle; /* thread handle */
578 thread_id_t tid_in; /* thread id (optional) */
579 @REPLY
580 process_id_t pid; /* server process id */
581 thread_id_t tid; /* server thread id */
582 void* teb; /* thread teb pointer */
583 int exit_code; /* thread exit code */
584 int priority; /* thread priority level */
585 int affinity; /* thread affinity mask */
586 timeout_t creation_time; /* thread creation time */
587 timeout_t exit_time; /* thread exit time */
588 int last; /* last thread in process */
589 @END
592 /* Set a thread informations */
593 @REQ(set_thread_info)
594 obj_handle_t handle; /* thread handle */
595 int mask; /* setting mask (see below) */
596 int priority; /* priority class */
597 int affinity; /* affinity mask */
598 obj_handle_t token; /* impersonation token */
599 @END
600 #define SET_THREAD_INFO_PRIORITY 0x01
601 #define SET_THREAD_INFO_AFFINITY 0x02
602 #define SET_THREAD_INFO_TOKEN 0x04
605 /* Retrieve information about a module */
606 @REQ(get_dll_info)
607 obj_handle_t handle; /* process handle */
608 void* base_address; /* base address of module */
609 @REPLY
610 size_t size; /* module size */
611 void* entry_point;
612 VARARG(filename,unicode_str); /* file name of module */
613 @END
616 /* Suspend a thread */
617 @REQ(suspend_thread)
618 obj_handle_t handle; /* thread handle */
619 @REPLY
620 int count; /* new suspend count */
621 @END
624 /* Resume a thread */
625 @REQ(resume_thread)
626 obj_handle_t handle; /* thread handle */
627 @REPLY
628 int count; /* new suspend count */
629 @END
632 /* Notify the server that a dll has been loaded */
633 @REQ(load_dll)
634 obj_handle_t handle; /* file handle */
635 void* base; /* base address */
636 size_t size; /* dll size */
637 int dbg_offset; /* debug info offset */
638 int dbg_size; /* debug info size */
639 void* name; /* ptr to ptr to name (in process addr space) */
640 VARARG(filename,unicode_str); /* file name of dll */
641 @END
644 /* Notify the server that a dll is being unloaded */
645 @REQ(unload_dll)
646 void* base; /* base address */
647 @END
650 /* Queue an APC for a thread or process */
651 @REQ(queue_apc)
652 obj_handle_t thread; /* thread handle */
653 obj_handle_t process; /* process handle */
654 apc_call_t call; /* call arguments */
655 @REPLY
656 obj_handle_t handle; /* APC handle */
657 int self; /* run APC in caller itself? */
658 @END
661 /* Get the result of an APC call */
662 @REQ(get_apc_result)
663 obj_handle_t handle; /* handle to the APC */
664 @REPLY
665 apc_result_t result; /* result of the APC */
666 @END
669 /* Close a handle for the current process */
670 @REQ(close_handle)
671 obj_handle_t handle; /* handle to close */
672 @END
675 /* Set a handle information */
676 @REQ(set_handle_info)
677 obj_handle_t handle; /* handle we are interested in */
678 int flags; /* new handle flags */
679 int mask; /* mask for flags to set */
680 @REPLY
681 int old_flags; /* old flag value */
682 @END
685 /* Duplicate a handle */
686 @REQ(dup_handle)
687 obj_handle_t src_process; /* src process handle */
688 obj_handle_t src_handle; /* src handle to duplicate */
689 obj_handle_t dst_process; /* dst process handle */
690 unsigned int access; /* wanted access rights */
691 unsigned int attributes; /* object attributes */
692 unsigned int options; /* duplicate options (see below) */
693 @REPLY
694 obj_handle_t handle; /* duplicated handle in dst process */
695 int self; /* is the source the current process? */
696 int closed; /* whether the source handle has been closed */
697 @END
698 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
699 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
700 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
703 /* Open a handle to a process */
704 @REQ(open_process)
705 process_id_t pid; /* process id to open */
706 unsigned int access; /* wanted access rights */
707 unsigned int attributes; /* object attributes */
708 @REPLY
709 obj_handle_t handle; /* handle to the process */
710 @END
713 /* Open a handle to a thread */
714 @REQ(open_thread)
715 thread_id_t tid; /* thread 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 thread */
720 @END
723 /* Wait for handles */
724 @REQ(select)
725 int flags; /* wait flags (see below) */
726 void* cookie; /* magic cookie to return to client */
727 obj_handle_t signal; /* object to signal (0 if none) */
728 obj_handle_t prev_apc; /* handle to previous APC */
729 timeout_t timeout; /* timeout */
730 VARARG(result,apc_result); /* result of previous APC */
731 VARARG(handles,handles); /* handles to select on */
732 @REPLY
733 obj_handle_t apc_handle; /* handle to next APC */
734 timeout_t timeout; /* timeout converted to absolute */
735 apc_call_t call; /* APC call arguments */
736 @END
737 #define SELECT_ALL 1
738 #define SELECT_ALERTABLE 2
739 #define SELECT_INTERRUPTIBLE 4
742 /* Create an event */
743 @REQ(create_event)
744 unsigned int access; /* wanted access rights */
745 unsigned int attributes; /* object attributes */
746 obj_handle_t rootdir; /* root directory */
747 int manual_reset; /* manual reset event */
748 int initial_state; /* initial state of the event */
749 VARARG(name,unicode_str); /* object name */
750 @REPLY
751 obj_handle_t handle; /* handle to the event */
752 @END
754 /* Event operation */
755 @REQ(event_op)
756 obj_handle_t handle; /* handle to event */
757 int op; /* event operation (see below) */
758 @END
759 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
762 /* Open an event */
763 @REQ(open_event)
764 unsigned int access; /* wanted access rights */
765 unsigned int attributes; /* object attributes */
766 obj_handle_t rootdir; /* root directory */
767 VARARG(name,unicode_str); /* object name */
768 @REPLY
769 obj_handle_t handle; /* handle to the event */
770 @END
773 /* Create a mutex */
774 @REQ(create_mutex)
775 unsigned int access; /* wanted access rights */
776 unsigned int attributes; /* object attributes */
777 obj_handle_t rootdir; /* root directory */
778 int owned; /* initially owned? */
779 VARARG(name,unicode_str); /* object name */
780 @REPLY
781 obj_handle_t handle; /* handle to the mutex */
782 @END
785 /* Release a mutex */
786 @REQ(release_mutex)
787 obj_handle_t handle; /* handle to the mutex */
788 @REPLY
789 unsigned int prev_count; /* value of internal counter, before release */
790 @END
793 /* Open a mutex */
794 @REQ(open_mutex)
795 unsigned int access; /* wanted access rights */
796 unsigned int attributes; /* object attributes */
797 obj_handle_t rootdir; /* root directory */
798 VARARG(name,unicode_str); /* object name */
799 @REPLY
800 obj_handle_t handle; /* handle to the mutex */
801 @END
804 /* Create a semaphore */
805 @REQ(create_semaphore)
806 unsigned int access; /* wanted access rights */
807 unsigned int attributes; /* object attributes */
808 obj_handle_t rootdir; /* root directory */
809 unsigned int initial; /* initial count */
810 unsigned int max; /* maximum count */
811 VARARG(name,unicode_str); /* object name */
812 @REPLY
813 obj_handle_t handle; /* handle to the semaphore */
814 @END
817 /* Release a semaphore */
818 @REQ(release_semaphore)
819 obj_handle_t handle; /* handle to the semaphore */
820 unsigned int count; /* count to add to semaphore */
821 @REPLY
822 unsigned int prev_count; /* previous semaphore count */
823 @END
826 /* Open a semaphore */
827 @REQ(open_semaphore)
828 unsigned int access; /* wanted access rights */
829 unsigned int attributes; /* object attributes */
830 obj_handle_t rootdir; /* root directory */
831 VARARG(name,unicode_str); /* object name */
832 @REPLY
833 obj_handle_t handle; /* handle to the semaphore */
834 @END
837 /* Create a file */
838 @REQ(create_file)
839 unsigned int access; /* wanted access rights */
840 unsigned int attributes; /* object attributes */
841 unsigned int sharing; /* sharing flags */
842 int create; /* file create action */
843 unsigned int options; /* file options */
844 unsigned int attrs; /* file attributes for creation */
845 VARARG(filename,string); /* file name */
846 @REPLY
847 obj_handle_t handle; /* handle to the file */
848 @END
851 /* Open a file object */
852 @REQ(open_file_object)
853 unsigned int access; /* wanted access rights */
854 unsigned int attributes; /* open attributes */
855 obj_handle_t rootdir; /* root directory */
856 unsigned int sharing; /* sharing flags */
857 unsigned int options; /* file options */
858 VARARG(filename,unicode_str); /* file name */
859 @REPLY
860 obj_handle_t handle; /* handle to the file */
861 @END
864 /* Allocate a file handle for a Unix fd */
865 @REQ(alloc_file_handle)
866 unsigned int access; /* wanted access rights */
867 unsigned int attributes; /* object attributes */
868 int fd; /* file descriptor on the client side */
869 @REPLY
870 obj_handle_t handle; /* handle to the file */
871 @END
874 /* Get a Unix fd to access a file */
875 @REQ(get_handle_fd)
876 obj_handle_t handle; /* handle to the file */
877 @REPLY
878 int type; /* file type (see below) */
879 int removable; /* is file removable? */
880 unsigned int access; /* file access rights */
881 unsigned int options; /* file open options */
882 @END
883 enum server_fd_type
885 FD_TYPE_INVALID, /* invalid file (no associated fd) */
886 FD_TYPE_FILE, /* regular file */
887 FD_TYPE_DIR, /* directory */
888 FD_TYPE_SOCKET, /* socket */
889 FD_TYPE_SERIAL, /* serial port */
890 FD_TYPE_PIPE, /* named pipe */
891 FD_TYPE_MAILSLOT, /* mailslot */
892 FD_TYPE_CHAR, /* unspecified char device */
893 FD_TYPE_DEVICE, /* Windows device file */
894 FD_TYPE_NB_TYPES
898 /* Flush a file buffers */
899 @REQ(flush_file)
900 obj_handle_t handle; /* handle to the file */
901 @REPLY
902 obj_handle_t event; /* event set when finished */
903 @END
906 /* Lock a region of a file */
907 @REQ(lock_file)
908 obj_handle_t handle; /* handle to the file */
909 file_pos_t offset; /* offset of start of lock */
910 file_pos_t count; /* count of bytes to lock */
911 int shared; /* shared or exclusive lock? */
912 int wait; /* do we want to wait? */
913 @REPLY
914 obj_handle_t handle; /* handle to wait on */
915 int overlapped; /* is it an overlapped I/O handle? */
916 @END
919 /* Unlock a region of a file */
920 @REQ(unlock_file)
921 obj_handle_t handle; /* handle to the file */
922 file_pos_t offset; /* offset of start of unlock */
923 file_pos_t count; /* count of bytes to unlock */
924 @END
927 /* Create a socket */
928 @REQ(create_socket)
929 unsigned int access; /* wanted access rights */
930 unsigned int attributes; /* object attributes */
931 int family; /* family, see socket manpage */
932 int type; /* type, see socket manpage */
933 int protocol; /* protocol, see socket manpage */
934 unsigned int flags; /* socket flags */
935 @REPLY
936 obj_handle_t handle; /* handle to the new socket */
937 @END
940 /* Accept a socket */
941 @REQ(accept_socket)
942 obj_handle_t lhandle; /* handle to the listening socket */
943 unsigned int access; /* wanted access rights */
944 unsigned int attributes; /* object attributes */
945 @REPLY
946 obj_handle_t handle; /* handle to the new socket */
947 @END
950 /* Set socket event parameters */
951 @REQ(set_socket_event)
952 obj_handle_t handle; /* handle to the socket */
953 unsigned int mask; /* event mask */
954 obj_handle_t event; /* event object */
955 user_handle_t window; /* window to send the message to */
956 unsigned int msg; /* message to send */
957 @END
960 /* Get socket event parameters */
961 @REQ(get_socket_event)
962 obj_handle_t handle; /* handle to the socket */
963 int service; /* clear pending? */
964 obj_handle_t c_event; /* event to clear */
965 @REPLY
966 unsigned int mask; /* event mask */
967 unsigned int pmask; /* pending events */
968 unsigned int state; /* status bits */
969 VARARG(errors,ints); /* event errors */
970 @END
973 /* Reenable pending socket events */
974 @REQ(enable_socket_event)
975 obj_handle_t handle; /* handle to the socket */
976 unsigned int mask; /* events to re-enable */
977 unsigned int sstate; /* status bits to set */
978 unsigned int cstate; /* status bits to clear */
979 @END
981 @REQ(set_socket_deferred)
982 obj_handle_t handle; /* handle to the socket */
983 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
984 @END
986 /* Allocate a console (only used by a console renderer) */
987 @REQ(alloc_console)
988 unsigned int access; /* wanted access rights */
989 unsigned int attributes; /* object attributes */
990 process_id_t pid; /* pid of process which shall be attached to the console */
991 @REPLY
992 obj_handle_t handle_in; /* handle to console input */
993 obj_handle_t event; /* handle to renderer events change notification */
994 @END
997 /* Free the console of the current process */
998 @REQ(free_console)
999 @END
1002 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1003 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1004 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1005 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1006 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1007 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1008 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1009 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1010 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1011 struct console_renderer_event
1013 short event;
1014 union
1016 struct update
1018 short top;
1019 short bottom;
1020 } update;
1021 struct resize
1023 short width;
1024 short height;
1025 } resize;
1026 struct cursor_pos
1028 short x;
1029 short y;
1030 } cursor_pos;
1031 struct cursor_geom
1033 short visible;
1034 short size;
1035 } cursor_geom;
1036 struct display
1038 short left;
1039 short top;
1040 short width;
1041 short height;
1042 } display;
1043 } u;
1046 /* retrieve console events for the renderer */
1047 @REQ(get_console_renderer_events)
1048 obj_handle_t handle; /* handle to console input events */
1049 @REPLY
1050 VARARG(data,bytes); /* the various console_renderer_events */
1051 @END
1054 /* Open a handle to the process console */
1055 @REQ(open_console)
1056 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1057 /* otherwise console_in handle to get active screen buffer? */
1058 unsigned int access; /* wanted access rights */
1059 unsigned int attributes; /* object attributes */
1060 int share; /* share mask (only for output handles) */
1061 @REPLY
1062 obj_handle_t handle; /* handle to the console */
1063 @END
1066 /* Get the input queue wait event */
1067 @REQ(get_console_wait_event)
1068 @REPLY
1069 obj_handle_t handle;
1070 @END
1072 /* Get a console mode (input or output) */
1073 @REQ(get_console_mode)
1074 obj_handle_t handle; /* handle to the console */
1075 @REPLY
1076 int mode; /* console mode */
1077 @END
1080 /* Set a console mode (input or output) */
1081 @REQ(set_console_mode)
1082 obj_handle_t handle; /* handle to the console */
1083 int mode; /* console mode */
1084 @END
1087 /* Set info about a console (input only) */
1088 @REQ(set_console_input_info)
1089 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1090 int mask; /* setting mask (see below) */
1091 obj_handle_t active_sb; /* active screen buffer */
1092 int history_mode; /* whether we duplicate lines in history */
1093 int history_size; /* number of lines in history */
1094 int edition_mode; /* index to the edition mode flavors */
1095 int input_cp; /* console input codepage */
1096 int output_cp; /* console output codepage */
1097 user_handle_t win; /* console window if backend supports it */
1098 VARARG(title,unicode_str); /* console title */
1099 @END
1100 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1101 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1102 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1103 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1104 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1105 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1106 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1107 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1110 /* Get info about a console (input only) */
1111 @REQ(get_console_input_info)
1112 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1113 @REPLY
1114 int history_mode; /* whether we duplicate lines in history */
1115 int history_size; /* number of lines in history */
1116 int history_index; /* number of used lines in history */
1117 int edition_mode; /* index to the edition mode flavors */
1118 int input_cp; /* console input codepage */
1119 int output_cp; /* console output codepage */
1120 user_handle_t win; /* console window if backend supports it */
1121 VARARG(title,unicode_str); /* console title */
1122 @END
1125 /* appends a string to console's history */
1126 @REQ(append_console_input_history)
1127 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1128 VARARG(line,unicode_str); /* line to add */
1129 @END
1132 /* appends a string to console's history */
1133 @REQ(get_console_input_history)
1134 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1135 int index; /* index to get line from */
1136 @REPLY
1137 int total; /* total length of line in Unicode chars */
1138 VARARG(line,unicode_str); /* line to add */
1139 @END
1142 /* creates a new screen buffer on process' console */
1143 @REQ(create_console_output)
1144 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1145 unsigned int access; /* wanted access rights */
1146 unsigned int attributes; /* object attributes */
1147 unsigned int share; /* sharing credentials */
1148 @REPLY
1149 obj_handle_t handle_out; /* handle to the screen buffer */
1150 @END
1153 /* Set info about a console (output only) */
1154 @REQ(set_console_output_info)
1155 obj_handle_t handle; /* handle to the console */
1156 int mask; /* setting mask (see below) */
1157 short int cursor_size; /* size of cursor (percentage filled) */
1158 short int cursor_visible;/* cursor visibility flag */
1159 short int cursor_x; /* position of cursor (x, y) */
1160 short int cursor_y;
1161 short int width; /* width of the screen buffer */
1162 short int height; /* height of the screen buffer */
1163 short int attr; /* default attribute */
1164 short int win_left; /* window actually displayed by renderer */
1165 short int win_top; /* the rect area is expressed withing the */
1166 short int win_right; /* boundaries of the screen buffer */
1167 short int win_bottom;
1168 short int max_width; /* maximum size (width x height) for the window */
1169 short int max_height;
1170 @END
1171 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1172 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1173 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1174 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1175 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1176 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1179 /* Get info about a console (output only) */
1180 @REQ(get_console_output_info)
1181 obj_handle_t handle; /* handle to the console */
1182 @REPLY
1183 short int cursor_size; /* size of cursor (percentage filled) */
1184 short int cursor_visible;/* cursor visibility flag */
1185 short int cursor_x; /* position of cursor (x, y) */
1186 short int cursor_y;
1187 short int width; /* width of the screen buffer */
1188 short int height; /* height of the screen buffer */
1189 short int attr; /* default attribute */
1190 short int win_left; /* window actually displayed by renderer */
1191 short int win_top; /* the rect area is expressed withing the */
1192 short int win_right; /* boundaries of the screen buffer */
1193 short int win_bottom;
1194 short int max_width; /* maximum size (width x height) for the window */
1195 short int max_height;
1196 @END
1198 /* Add input records to a console input queue */
1199 @REQ(write_console_input)
1200 obj_handle_t handle; /* handle to the console input */
1201 VARARG(rec,input_records); /* input records */
1202 @REPLY
1203 int written; /* number of records written */
1204 @END
1207 /* Fetch input records from a console input queue */
1208 @REQ(read_console_input)
1209 obj_handle_t handle; /* handle to the console input */
1210 int flush; /* flush the retrieved records from the queue? */
1211 @REPLY
1212 int read; /* number of records read */
1213 VARARG(rec,input_records); /* input records */
1214 @END
1217 /* write data (chars and/or attributes) in a screen buffer */
1218 @REQ(write_console_output)
1219 obj_handle_t handle; /* handle to the console output */
1220 int x; /* position where to start writing */
1221 int y;
1222 int mode; /* char info (see below) */
1223 int wrap; /* wrap around at end of line? */
1224 VARARG(data,bytes); /* info to write */
1225 @REPLY
1226 int written; /* number of char infos actually written */
1227 int width; /* width of screen buffer */
1228 int height; /* height of screen buffer */
1229 @END
1230 enum char_info_mode
1232 CHAR_INFO_MODE_TEXT, /* characters only */
1233 CHAR_INFO_MODE_ATTR, /* attributes only */
1234 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1235 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1239 /* fill a screen buffer with constant data (chars and/or attributes) */
1240 @REQ(fill_console_output)
1241 obj_handle_t handle; /* handle to the console output */
1242 int x; /* position where to start writing */
1243 int y;
1244 int mode; /* char info mode */
1245 int count; /* number to write */
1246 int wrap; /* wrap around at end of line? */
1247 char_info_t data; /* data to write */
1248 @REPLY
1249 int written; /* number of char infos actually written */
1250 @END
1253 /* read data (chars and/or attributes) from a screen buffer */
1254 @REQ(read_console_output)
1255 obj_handle_t handle; /* handle to the console output */
1256 int x; /* position (x,y) where to start reading */
1257 int y;
1258 int mode; /* char info mode */
1259 int wrap; /* wrap around at end of line? */
1260 @REPLY
1261 int width; /* width of screen buffer */
1262 int height; /* height of screen buffer */
1263 VARARG(data,bytes);
1264 @END
1267 /* move a rect (of data) in screen buffer content */
1268 @REQ(move_console_output)
1269 obj_handle_t handle; /* handle to the console output */
1270 short int x_src; /* position (x, y) of rect to start moving from */
1271 short int y_src;
1272 short int x_dst; /* position (x, y) of rect to move to */
1273 short int y_dst;
1274 short int w; /* size of the rect (width, height) to move */
1275 short int h;
1276 @END
1279 /* Sends a signal to a process group */
1280 @REQ(send_console_signal)
1281 int signal; /* the signal to send */
1282 process_id_t group_id; /* the group to send the signal to */
1283 @END
1286 /* enable directory change notifications */
1287 @REQ(read_directory_changes)
1288 unsigned int filter; /* notification filter */
1289 obj_handle_t handle; /* handle to the directory */
1290 int subtree; /* watch the subtree? */
1291 int want_data; /* flag indicating whether change data should be collected */
1292 async_data_t async; /* async I/O parameters */
1293 @END
1296 @REQ(read_change)
1297 obj_handle_t handle;
1298 @REPLY
1299 int action; /* type of change */
1300 VARARG(name,string); /* name of directory entry that changed */
1301 @END
1304 /* Create a file mapping */
1305 @REQ(create_mapping)
1306 unsigned int access; /* wanted access rights */
1307 unsigned int attributes; /* object attributes */
1308 obj_handle_t rootdir; /* root directory */
1309 file_pos_t size; /* mapping size */
1310 int protect; /* protection flags (see below) */
1311 obj_handle_t file_handle; /* file handle */
1312 VARARG(name,unicode_str); /* object name */
1313 @REPLY
1314 obj_handle_t handle; /* handle to the mapping */
1315 @END
1316 /* protection flags */
1317 #define VPROT_READ 0x01
1318 #define VPROT_WRITE 0x02
1319 #define VPROT_EXEC 0x04
1320 #define VPROT_WRITECOPY 0x08
1321 #define VPROT_GUARD 0x10
1322 #define VPROT_NOCACHE 0x20
1323 #define VPROT_COMMITTED 0x40
1324 #define VPROT_IMAGE 0x80
1327 /* Open a mapping */
1328 @REQ(open_mapping)
1329 unsigned int access; /* wanted access rights */
1330 unsigned int attributes; /* object attributes */
1331 obj_handle_t rootdir; /* root directory */
1332 VARARG(name,unicode_str); /* object name */
1333 @REPLY
1334 obj_handle_t handle; /* handle to the mapping */
1335 @END
1338 /* Get information about a file mapping */
1339 @REQ(get_mapping_info)
1340 obj_handle_t handle; /* handle to the mapping */
1341 @REPLY
1342 file_pos_t size; /* mapping size */
1343 int protect; /* protection flags */
1344 int header_size; /* header size (for VPROT_IMAGE mapping) */
1345 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1346 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1347 obj_handle_t shared_file; /* shared mapping file handle */
1348 @END
1351 #define SNAP_HEAPLIST 0x00000001
1352 #define SNAP_PROCESS 0x00000002
1353 #define SNAP_THREAD 0x00000004
1354 #define SNAP_MODULE 0x00000008
1355 /* Create a snapshot */
1356 @REQ(create_snapshot)
1357 unsigned int attributes; /* object attributes */
1358 int flags; /* snapshot flags (SNAP_*) */
1359 process_id_t pid; /* process id */
1360 @REPLY
1361 obj_handle_t handle; /* handle to the snapshot */
1362 @END
1365 /* Get the next process from a snapshot */
1366 @REQ(next_process)
1367 obj_handle_t handle; /* handle to the snapshot */
1368 int reset; /* reset snapshot position? */
1369 @REPLY
1370 int count; /* process usage count */
1371 process_id_t pid; /* process id */
1372 process_id_t ppid; /* parent process id */
1373 void* heap; /* heap base */
1374 void* module; /* main module */
1375 int threads; /* number of threads */
1376 int priority; /* process priority */
1377 int handles; /* number of handles */
1378 VARARG(filename,unicode_str); /* file name of main exe */
1379 @END
1382 /* Get the next thread from a snapshot */
1383 @REQ(next_thread)
1384 obj_handle_t handle; /* handle to the snapshot */
1385 int reset; /* reset snapshot position? */
1386 @REPLY
1387 int count; /* thread usage count */
1388 process_id_t pid; /* process id */
1389 thread_id_t tid; /* thread id */
1390 int base_pri; /* base priority */
1391 int delta_pri; /* delta priority */
1392 @END
1395 /* Get the next module from a snapshot */
1396 @REQ(next_module)
1397 obj_handle_t handle; /* handle to the snapshot */
1398 int reset; /* reset snapshot position? */
1399 @REPLY
1400 process_id_t pid; /* process id */
1401 void* base; /* module base address */
1402 size_t size; /* module size */
1403 VARARG(filename,unicode_str); /* file name of module */
1404 @END
1407 /* Wait for a debug event */
1408 @REQ(wait_debug_event)
1409 int get_handle; /* should we alloc a handle for waiting? */
1410 @REPLY
1411 process_id_t pid; /* process id */
1412 thread_id_t tid; /* thread id */
1413 obj_handle_t wait; /* wait handle if no event ready */
1414 VARARG(event,debug_event); /* debug event data */
1415 @END
1418 /* Queue an exception event */
1419 @REQ(queue_exception_event)
1420 int first; /* first chance exception? */
1421 VARARG(record,exc_event); /* thread context followed by exception record */
1422 @REPLY
1423 obj_handle_t handle; /* handle to the queued event */
1424 @END
1427 /* Retrieve the status of an exception event */
1428 @REQ(get_exception_status)
1429 obj_handle_t handle; /* handle to the queued event */
1430 @REPLY
1431 VARARG(context,context); /* modified thread context */
1432 @END
1435 /* Send an output string to the debugger */
1436 @REQ(output_debug_string)
1437 void* string; /* string to display (in debugged process address space) */
1438 int unicode; /* is it Unicode? */
1439 int length; /* string length */
1440 @END
1443 /* Continue a debug event */
1444 @REQ(continue_debug_event)
1445 process_id_t pid; /* process id to continue */
1446 thread_id_t tid; /* thread id to continue */
1447 int status; /* continuation status */
1448 @END
1451 /* Start/stop debugging an existing process */
1452 @REQ(debug_process)
1453 process_id_t pid; /* id of the process to debug */
1454 int attach; /* 1=attaching / 0=detaching from the process */
1455 @END
1458 /* Simulate a breakpoint in a process */
1459 @REQ(debug_break)
1460 obj_handle_t handle; /* process handle */
1461 @REPLY
1462 int self; /* was it the caller itself? */
1463 @END
1466 /* Set debugger kill on exit flag */
1467 @REQ(set_debugger_kill_on_exit)
1468 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1469 @END
1472 /* Read data from a process address space */
1473 @REQ(read_process_memory)
1474 obj_handle_t handle; /* process handle */
1475 void* addr; /* addr to read from */
1476 @REPLY
1477 VARARG(data,bytes); /* result data */
1478 @END
1481 /* Write data to a process address space */
1482 @REQ(write_process_memory)
1483 obj_handle_t handle; /* process handle */
1484 void* addr; /* addr to write to */
1485 VARARG(data,bytes); /* data to write */
1486 @END
1489 /* Create a registry key */
1490 @REQ(create_key)
1491 obj_handle_t parent; /* handle to the parent key */
1492 unsigned int access; /* desired access rights */
1493 unsigned int attributes; /* object attributes */
1494 unsigned int options; /* creation options */
1495 time_t modif; /* last modification time */
1496 data_size_t namelen; /* length of key name in bytes */
1497 VARARG(name,unicode_str,namelen); /* key name */
1498 VARARG(class,unicode_str); /* class name */
1499 @REPLY
1500 obj_handle_t hkey; /* handle to the created key */
1501 int created; /* has it been newly created? */
1502 @END
1504 /* Open a registry key */
1505 @REQ(open_key)
1506 obj_handle_t parent; /* handle to the parent key */
1507 unsigned int access; /* desired access rights */
1508 unsigned int attributes; /* object attributes */
1509 VARARG(name,unicode_str); /* key name */
1510 @REPLY
1511 obj_handle_t hkey; /* handle to the open key */
1512 @END
1515 /* Delete a registry key */
1516 @REQ(delete_key)
1517 obj_handle_t hkey; /* handle to the key */
1518 @END
1521 /* Flush a registry key */
1522 @REQ(flush_key)
1523 obj_handle_t hkey; /* handle to the key */
1524 @END
1527 /* Enumerate registry subkeys */
1528 @REQ(enum_key)
1529 obj_handle_t hkey; /* handle to registry key */
1530 int index; /* index of subkey (or -1 for current key) */
1531 int info_class; /* requested information class */
1532 @REPLY
1533 int subkeys; /* number of subkeys */
1534 int max_subkey; /* longest subkey name */
1535 int max_class; /* longest class name */
1536 int values; /* number of values */
1537 int max_value; /* longest value name */
1538 int max_data; /* longest value data */
1539 time_t modif; /* last modification time */
1540 data_size_t total; /* total length needed for full name and class */
1541 data_size_t namelen; /* length of key name in bytes */
1542 VARARG(name,unicode_str,namelen); /* key name */
1543 VARARG(class,unicode_str); /* class name */
1544 @END
1547 /* Set a value of a registry key */
1548 @REQ(set_key_value)
1549 obj_handle_t hkey; /* handle to registry key */
1550 int type; /* value type */
1551 data_size_t namelen; /* length of value name in bytes */
1552 VARARG(name,unicode_str,namelen); /* value name */
1553 VARARG(data,bytes); /* value data */
1554 @END
1557 /* Retrieve the value of a registry key */
1558 @REQ(get_key_value)
1559 obj_handle_t hkey; /* handle to registry key */
1560 VARARG(name,unicode_str); /* value name */
1561 @REPLY
1562 int type; /* value type */
1563 data_size_t total; /* total length needed for data */
1564 VARARG(data,bytes); /* value data */
1565 @END
1568 /* Enumerate a value of a registry key */
1569 @REQ(enum_key_value)
1570 obj_handle_t hkey; /* handle to registry key */
1571 int index; /* value index */
1572 int info_class; /* requested information class */
1573 @REPLY
1574 int type; /* value type */
1575 data_size_t total; /* total length needed for full name and data */
1576 data_size_t namelen; /* length of value name in bytes */
1577 VARARG(name,unicode_str,namelen); /* value name */
1578 VARARG(data,bytes); /* value data */
1579 @END
1582 /* Delete a value of a registry key */
1583 @REQ(delete_key_value)
1584 obj_handle_t hkey; /* handle to registry key */
1585 VARARG(name,unicode_str); /* value name */
1586 @END
1589 /* Load a registry branch from a file */
1590 @REQ(load_registry)
1591 obj_handle_t hkey; /* root key to load to */
1592 obj_handle_t file; /* file to load from */
1593 VARARG(name,unicode_str); /* subkey name */
1594 @END
1597 /* UnLoad a registry branch from a file */
1598 @REQ(unload_registry)
1599 obj_handle_t hkey; /* root key to unload to */
1600 @END
1603 /* Save a registry branch to a file */
1604 @REQ(save_registry)
1605 obj_handle_t hkey; /* key to save */
1606 obj_handle_t file; /* file to save to */
1607 @END
1610 /* Add a registry key change notification */
1611 @REQ(set_registry_notification)
1612 obj_handle_t hkey; /* key to watch for changes */
1613 obj_handle_t event; /* event to set */
1614 int subtree; /* should we watch the whole subtree? */
1615 unsigned int filter; /* things to watch */
1616 @END
1619 /* Create a waitable timer */
1620 @REQ(create_timer)
1621 unsigned int access; /* wanted access rights */
1622 unsigned int attributes; /* object attributes */
1623 obj_handle_t rootdir; /* root directory */
1624 int manual; /* manual reset */
1625 VARARG(name,unicode_str); /* object name */
1626 @REPLY
1627 obj_handle_t handle; /* handle to the timer */
1628 @END
1631 /* Open a waitable timer */
1632 @REQ(open_timer)
1633 unsigned int access; /* wanted access rights */
1634 unsigned int attributes; /* object attributes */
1635 obj_handle_t rootdir; /* root directory */
1636 VARARG(name,unicode_str); /* object name */
1637 @REPLY
1638 obj_handle_t handle; /* handle to the timer */
1639 @END
1641 /* Set a waitable timer */
1642 @REQ(set_timer)
1643 obj_handle_t handle; /* handle to the timer */
1644 timeout_t expire; /* next expiration absolute time */
1645 int period; /* timer period in ms */
1646 void* callback; /* callback function */
1647 void* arg; /* callback argument */
1648 @REPLY
1649 int signaled; /* was the timer signaled before this call ? */
1650 @END
1652 /* Cancel a waitable timer */
1653 @REQ(cancel_timer)
1654 obj_handle_t handle; /* handle to the timer */
1655 @REPLY
1656 int signaled; /* was the timer signaled before this calltime ? */
1657 @END
1659 /* Get information on a waitable timer */
1660 @REQ(get_timer_info)
1661 obj_handle_t handle; /* handle to the timer */
1662 @REPLY
1663 timeout_t when; /* absolute time when the timer next expires */
1664 int signaled; /* is the timer signaled? */
1665 @END
1668 /* Retrieve the current context of a thread */
1669 @REQ(get_thread_context)
1670 obj_handle_t handle; /* thread handle */
1671 unsigned int flags; /* context flags */
1672 int suspend; /* if getting context during suspend */
1673 @REPLY
1674 int self; /* was it a handle to the current thread? */
1675 VARARG(context,context); /* thread context */
1676 @END
1679 /* Set the current context of a thread */
1680 @REQ(set_thread_context)
1681 obj_handle_t handle; /* thread handle */
1682 unsigned int flags; /* context flags */
1683 int suspend; /* if setting context during suspend */
1684 VARARG(context,context); /* thread context */
1685 @REPLY
1686 int self; /* was it a handle to the current thread? */
1687 @END
1690 /* Fetch a selector entry for a thread */
1691 @REQ(get_selector_entry)
1692 obj_handle_t handle; /* thread handle */
1693 int entry; /* LDT entry */
1694 @REPLY
1695 unsigned int base; /* selector base */
1696 unsigned int limit; /* selector limit */
1697 unsigned char flags; /* selector flags */
1698 @END
1701 /* Add an atom */
1702 @REQ(add_atom)
1703 obj_handle_t table; /* which table to add atom to */
1704 VARARG(name,unicode_str); /* atom name */
1705 @REPLY
1706 atom_t atom; /* resulting atom */
1707 @END
1710 /* Delete an atom */
1711 @REQ(delete_atom)
1712 obj_handle_t table; /* which table to delete atom from */
1713 atom_t atom; /* atom handle */
1714 @END
1717 /* Find an atom */
1718 @REQ(find_atom)
1719 obj_handle_t table; /* which table to find atom from */
1720 VARARG(name,unicode_str); /* atom name */
1721 @REPLY
1722 atom_t atom; /* atom handle */
1723 @END
1726 /* Get information about an atom */
1727 @REQ(get_atom_information)
1728 obj_handle_t table; /* which table to find atom from */
1729 atom_t atom; /* atom handle */
1730 @REPLY
1731 int count; /* atom lock count */
1732 int pinned; /* whether the atom has been pinned */
1733 data_size_t total; /* actual length of atom name */
1734 VARARG(name,unicode_str); /* atom name */
1735 @END
1738 /* Set information about an atom */
1739 @REQ(set_atom_information)
1740 obj_handle_t table; /* which table to find atom from */
1741 atom_t atom; /* atom handle */
1742 int pinned; /* whether to bump atom information */
1743 @END
1746 /* Empty an atom table */
1747 @REQ(empty_atom_table)
1748 obj_handle_t table; /* which table to find atom from */
1749 int if_pinned; /* whether to delete pinned atoms */
1750 @END
1753 /* Init an atom table */
1754 @REQ(init_atom_table)
1755 int entries; /* number of entries (only for local) */
1756 @REPLY
1757 obj_handle_t table; /* handle to the atom table */
1758 @END
1761 /* Get the message queue of the current thread */
1762 @REQ(get_msg_queue)
1763 @REPLY
1764 obj_handle_t handle; /* handle to the queue */
1765 @END
1768 /* Set the file descriptor associated to the current thread queue */
1769 @REQ(set_queue_fd)
1770 obj_handle_t handle; /* handle to the file descriptor */
1771 @END
1774 /* Set the current message queue wakeup mask */
1775 @REQ(set_queue_mask)
1776 unsigned int wake_mask; /* wakeup bits mask */
1777 unsigned int changed_mask; /* changed bits mask */
1778 int skip_wait; /* will we skip waiting if signaled? */
1779 @REPLY
1780 unsigned int wake_bits; /* current wake bits */
1781 unsigned int changed_bits; /* current changed bits */
1782 @END
1785 /* Get the current message queue status */
1786 @REQ(get_queue_status)
1787 int clear; /* should we clear the change bits? */
1788 @REPLY
1789 unsigned int wake_bits; /* wake bits */
1790 unsigned int changed_bits; /* changed bits since last time */
1791 @END
1794 /* Retrieve the process idle event */
1795 @REQ(get_process_idle_event)
1796 obj_handle_t handle; /* process handle */
1797 @REPLY
1798 obj_handle_t event; /* handle to idle event */
1799 @END
1802 /* Send a message to a thread queue */
1803 @REQ(send_message)
1804 thread_id_t id; /* thread id */
1805 int type; /* message type (see below) */
1806 int flags; /* message flags (see below) */
1807 user_handle_t win; /* window handle */
1808 unsigned int msg; /* message code */
1809 unsigned long wparam; /* parameters */
1810 unsigned long lparam; /* parameters */
1811 timeout_t timeout; /* timeout for reply */
1812 VARARG(data,message_data); /* message data for sent messages */
1813 @END
1815 @REQ(post_quit_message)
1816 int exit_code; /* exit code to return */
1817 @END
1819 enum message_type
1821 MSG_ASCII, /* Ascii message (from SendMessageA) */
1822 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1823 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1824 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1825 MSG_CALLBACK_RESULT,/* result of a callback message */
1826 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1827 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1828 MSG_HARDWARE, /* hardware message */
1829 MSG_WINEVENT /* winevent message */
1831 #define SEND_MSG_ABORT_IF_HUNG 0x01
1834 /* Send a hardware message to a thread queue */
1835 @REQ(send_hardware_message)
1836 thread_id_t id; /* thread id */
1837 user_handle_t win; /* window handle */
1838 unsigned int msg; /* message code */
1839 unsigned int time; /* message time */
1840 unsigned long wparam; /* parameters */
1841 unsigned long lparam; /* parameters */
1842 unsigned long info; /* extra info */
1843 int x; /* x position */
1844 int y; /* y position */
1845 @END
1848 /* Get a message from the current queue */
1849 @REQ(get_message)
1850 unsigned int flags; /* PM_* flags */
1851 user_handle_t get_win; /* window handle to get */
1852 unsigned int get_first; /* first message code to get */
1853 unsigned int get_last; /* last message code to get */
1854 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1855 unsigned int wake_mask; /* wakeup bits mask */
1856 unsigned int changed_mask; /* changed bits mask */
1857 @REPLY
1858 user_handle_t win; /* window handle */
1859 int type; /* message type */
1860 unsigned int msg; /* message code */
1861 unsigned long wparam; /* parameters */
1862 unsigned long lparam; /* parameters */
1863 unsigned long info; /* extra info */
1864 int x; /* x position */
1865 int y; /* y position */
1866 unsigned int time; /* message time */
1867 unsigned int hw_id; /* id if hardware message */
1868 unsigned int active_hooks; /* active hooks bitmap */
1869 data_size_t total; /* total size of extra data */
1870 VARARG(data,message_data); /* message data for sent messages */
1871 @END
1874 /* Reply to a sent message */
1875 @REQ(reply_message)
1876 unsigned long result; /* message result */
1877 int remove; /* should we remove the message? */
1878 VARARG(data,bytes); /* message data for sent messages */
1879 @END
1882 /* Accept the current hardware message */
1883 @REQ(accept_hardware_message)
1884 unsigned int hw_id; /* id of the hardware message */
1885 int remove; /* should we remove the message? */
1886 user_handle_t new_win; /* new destination window for current message */
1887 @END
1890 /* Retrieve the reply for the last message sent */
1891 @REQ(get_message_reply)
1892 int cancel; /* cancel message if not ready? */
1893 @REPLY
1894 unsigned long result; /* message result */
1895 VARARG(data,bytes); /* message data for sent messages */
1896 @END
1899 /* Set a window timer */
1900 @REQ(set_win_timer)
1901 user_handle_t win; /* window handle */
1902 unsigned int msg; /* message to post */
1903 unsigned int rate; /* timer rate in ms */
1904 unsigned long id; /* timer id */
1905 unsigned long lparam; /* message lparam (callback proc) */
1906 @REPLY
1907 unsigned long id; /* timer id */
1908 @END
1911 /* Kill a window timer */
1912 @REQ(kill_win_timer)
1913 user_handle_t win; /* window handle */
1914 unsigned int msg; /* message to post */
1915 unsigned long id; /* timer id */
1916 @END
1919 /* Retrieve info about a serial port */
1920 @REQ(get_serial_info)
1921 obj_handle_t handle; /* handle to comm port */
1922 @REPLY
1923 unsigned int readinterval;
1924 unsigned int readconst;
1925 unsigned int readmult;
1926 unsigned int writeconst;
1927 unsigned int writemult;
1928 unsigned int eventmask;
1929 @END
1932 /* Set info about a serial port */
1933 @REQ(set_serial_info)
1934 obj_handle_t handle; /* handle to comm port */
1935 int flags; /* bitmask to set values (see below) */
1936 unsigned int readinterval;
1937 unsigned int readconst;
1938 unsigned int readmult;
1939 unsigned int writeconst;
1940 unsigned int writemult;
1941 unsigned int eventmask;
1942 @END
1943 #define SERIALINFO_SET_TIMEOUTS 0x01
1944 #define SERIALINFO_SET_MASK 0x02
1947 /* Create an async I/O */
1948 @REQ(register_async)
1949 obj_handle_t handle; /* handle to comm port, socket or file */
1950 int type; /* type of queue to look after */
1951 int count; /* count - usually # of bytes to be read/written */
1952 async_data_t async; /* async I/O parameters */
1953 @END
1954 #define ASYNC_TYPE_READ 0x01
1955 #define ASYNC_TYPE_WRITE 0x02
1956 #define ASYNC_TYPE_WAIT 0x03
1959 /* Cancel all async op on a fd */
1960 @REQ(cancel_async)
1961 obj_handle_t handle; /* handle to comm port, socket or file */
1962 @END
1965 /* Perform an ioctl on a file */
1966 @REQ(ioctl)
1967 obj_handle_t handle; /* handle to the device */
1968 ioctl_code_t code; /* ioctl code */
1969 async_data_t async; /* async I/O parameters */
1970 VARARG(in_data,bytes); /* ioctl input data */
1971 @REPLY
1972 obj_handle_t wait; /* handle to wait on for blocking ioctl */
1973 unsigned int options; /* device open options */
1974 VARARG(out_data,bytes); /* ioctl output data */
1975 @END
1978 /* Retrieve results of an async ioctl */
1979 @REQ(get_ioctl_result)
1980 obj_handle_t handle; /* handle to the device */
1981 void* user_arg; /* user arg used to identify the request */
1982 @REPLY
1983 VARARG(out_data,bytes); /* ioctl output data */
1984 @END
1987 /* Create a named pipe */
1988 @REQ(create_named_pipe)
1989 unsigned int access;
1990 unsigned int attributes; /* object attributes */
1991 obj_handle_t rootdir; /* root directory */
1992 unsigned int options;
1993 unsigned int flags;
1994 unsigned int maxinstances;
1995 unsigned int outsize;
1996 unsigned int insize;
1997 timeout_t timeout;
1998 VARARG(name,unicode_str); /* pipe name */
1999 @REPLY
2000 obj_handle_t handle; /* handle to the pipe */
2001 @END
2003 /* flags in create_named_pipe and get_named_pipe_info */
2004 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2005 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2006 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2007 #define NAMED_PIPE_SERVER_END 0x8000
2010 @REQ(get_named_pipe_info)
2011 obj_handle_t handle;
2012 @REPLY
2013 unsigned int flags;
2014 unsigned int maxinstances;
2015 unsigned int instances;
2016 unsigned int outsize;
2017 unsigned int insize;
2018 @END
2021 /* Create a cursor */
2022 @REQ(create_cursor)
2023 unsigned int num_frames;
2024 unsigned short delay;
2025 @REPLY
2026 user_handle_t handle;
2027 @END
2030 /* Destroy a cursor */
2031 @REQ(destroy_cursor)
2032 user_handle_t handle;
2033 @END
2036 /* Get cursor info */
2037 @REQ(get_cursor_info)
2038 user_handle_t handle;
2039 @REPLY
2040 unsigned int num_frames;
2041 unsigned short delay;
2042 @END
2045 /* Get cursor frame */
2046 @REQ(get_cursor_frame)
2047 user_handle_t handle;
2048 unsigned int frame_idx;
2049 @REPLY
2050 unsigned short xhot;
2051 unsigned short yhot;
2052 unsigned short width;
2053 unsigned short height;
2054 unsigned short and_width_bytes;
2055 unsigned short xor_width_bytes;
2056 unsigned char planes;
2057 unsigned char bpp;
2058 VARARG(data,bytes);
2059 @END
2062 /* Set cursor frame */
2063 @REQ(set_cursor_frame)
2064 user_handle_t handle;
2065 unsigned int frame_idx;
2066 unsigned short xhot;
2067 unsigned short yhot;
2068 unsigned short width;
2069 unsigned short height;
2070 unsigned short and_width_bytes;
2071 unsigned short xor_width_bytes;
2072 unsigned char planes;
2073 unsigned char bpp;
2074 VARARG(data,bytes);
2075 @END
2078 /* Create a window */
2079 @REQ(create_window)
2080 user_handle_t parent; /* parent window */
2081 user_handle_t owner; /* owner window */
2082 atom_t atom; /* class atom */
2083 void* instance; /* module instance */
2084 @REPLY
2085 user_handle_t handle; /* created window */
2086 user_handle_t parent; /* full handle of parent */
2087 user_handle_t owner; /* full handle of owner */
2088 int extra; /* number of extra bytes */
2089 void* class_ptr; /* pointer to class in client address space */
2090 @END
2093 /* Destroy a window */
2094 @REQ(destroy_window)
2095 user_handle_t handle; /* handle to the window */
2096 @END
2099 /* Retrieve the desktop window for the current thread */
2100 @REQ(get_desktop_window)
2101 int force; /* force creation if it doesn't exist */
2102 @REPLY
2103 user_handle_t handle; /* handle to the desktop window */
2104 @END
2107 /* Set a window owner */
2108 @REQ(set_window_owner)
2109 user_handle_t handle; /* handle to the window */
2110 user_handle_t owner; /* new owner */
2111 @REPLY
2112 user_handle_t full_owner; /* full handle of new owner */
2113 user_handle_t prev_owner; /* full handle of previous owner */
2114 @END
2117 /* Get information from a window handle */
2118 @REQ(get_window_info)
2119 user_handle_t handle; /* handle to the window */
2120 @REPLY
2121 user_handle_t full_handle; /* full 32-bit handle */
2122 user_handle_t last_active; /* last active popup */
2123 process_id_t pid; /* process owning the window */
2124 thread_id_t tid; /* thread owning the window */
2125 atom_t atom; /* class atom */
2126 int is_unicode; /* ANSI or unicode */
2127 @END
2130 /* Set some information in a window */
2131 @REQ(set_window_info)
2132 unsigned int flags; /* flags for fields to set (see below) */
2133 user_handle_t handle; /* handle to the window */
2134 unsigned int style; /* window style */
2135 unsigned int ex_style; /* window extended style */
2136 unsigned int id; /* window id */
2137 int is_unicode; /* ANSI or unicode */
2138 void* instance; /* creator instance */
2139 unsigned long user_data; /* user-specific data */
2140 int extra_offset; /* offset to set in extra bytes */
2141 data_size_t extra_size; /* size to set in extra bytes */
2142 unsigned long extra_value; /* value to set in extra bytes */
2143 @REPLY
2144 unsigned int old_style; /* old window style */
2145 unsigned int old_ex_style; /* old window extended style */
2146 unsigned int old_id; /* old window id */
2147 void* old_instance; /* old creator instance */
2148 unsigned long old_user_data; /* old user-specific data */
2149 unsigned long old_extra_value; /* old value in extra bytes */
2150 @END
2151 #define SET_WIN_STYLE 0x01
2152 #define SET_WIN_EXSTYLE 0x02
2153 #define SET_WIN_ID 0x04
2154 #define SET_WIN_INSTANCE 0x08
2155 #define SET_WIN_USERDATA 0x10
2156 #define SET_WIN_EXTRA 0x20
2157 #define SET_WIN_UNICODE 0x40
2160 /* Set the parent of a window */
2161 @REQ(set_parent)
2162 user_handle_t handle; /* handle to the window */
2163 user_handle_t parent; /* handle to the parent */
2164 @REPLY
2165 user_handle_t old_parent; /* old parent window */
2166 user_handle_t full_parent; /* full handle of new parent */
2167 @END
2170 /* Get a list of the window parents, up to the root of the tree */
2171 @REQ(get_window_parents)
2172 user_handle_t handle; /* handle to the window */
2173 @REPLY
2174 int count; /* total count of parents */
2175 VARARG(parents,user_handles); /* parent handles */
2176 @END
2179 /* Get a list of the window children */
2180 @REQ(get_window_children)
2181 user_handle_t parent; /* parent window */
2182 atom_t atom; /* class atom for the listed children */
2183 thread_id_t tid; /* thread owning the listed children */
2184 @REPLY
2185 int count; /* total count of children */
2186 VARARG(children,user_handles); /* children handles */
2187 @END
2190 /* Get a list of the window children that contain a given point */
2191 @REQ(get_window_children_from_point)
2192 user_handle_t parent; /* parent window */
2193 int x; /* point in parent coordinates */
2194 int y;
2195 @REPLY
2196 int count; /* total count of children */
2197 VARARG(children,user_handles); /* children handles */
2198 @END
2201 /* Get window tree information from a window handle */
2202 @REQ(get_window_tree)
2203 user_handle_t handle; /* handle to the window */
2204 @REPLY
2205 user_handle_t parent; /* parent window */
2206 user_handle_t owner; /* owner window */
2207 user_handle_t next_sibling; /* next sibling in Z-order */
2208 user_handle_t prev_sibling; /* prev sibling in Z-order */
2209 user_handle_t first_sibling; /* first sibling in Z-order */
2210 user_handle_t last_sibling; /* last sibling in Z-order */
2211 user_handle_t first_child; /* first child */
2212 user_handle_t last_child; /* last child */
2213 @END
2215 /* Set the position and Z order of a window */
2216 @REQ(set_window_pos)
2217 unsigned int flags; /* SWP_* flags */
2218 user_handle_t handle; /* handle to the window */
2219 user_handle_t previous; /* previous window in Z order */
2220 rectangle_t window; /* window rectangle */
2221 rectangle_t client; /* client rectangle */
2222 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2223 @REPLY
2224 unsigned int new_style; /* new window style */
2225 @END
2228 /* Get the window and client rectangles of a window */
2229 @REQ(get_window_rectangles)
2230 user_handle_t handle; /* handle to the window */
2231 @REPLY
2232 rectangle_t window; /* window rectangle */
2233 rectangle_t visible; /* visible part of the window rectangle */
2234 rectangle_t client; /* client rectangle */
2235 @END
2238 /* Get the window text */
2239 @REQ(get_window_text)
2240 user_handle_t handle; /* handle to the window */
2241 @REPLY
2242 VARARG(text,unicode_str); /* window text */
2243 @END
2246 /* Set the window text */
2247 @REQ(set_window_text)
2248 user_handle_t handle; /* handle to the window */
2249 VARARG(text,unicode_str); /* window text */
2250 @END
2253 /* Get the coordinates offset between two windows */
2254 @REQ(get_windows_offset)
2255 user_handle_t from; /* handle to the first window */
2256 user_handle_t to; /* handle to the second window */
2257 @REPLY
2258 int x; /* x coordinate offset */
2259 int y; /* y coordinate offset */
2260 @END
2263 /* Get the visible region of a window */
2264 @REQ(get_visible_region)
2265 user_handle_t window; /* handle to the window */
2266 unsigned int flags; /* DCX flags */
2267 @REPLY
2268 user_handle_t top_win; /* top window to clip against */
2269 rectangle_t top_rect; /* top window visible rect with screen coords */
2270 rectangle_t win_rect; /* window rect in screen coords */
2271 data_size_t total_size; /* total size of the resulting region */
2272 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2273 @END
2276 /* Get the window region */
2277 @REQ(get_window_region)
2278 user_handle_t window; /* handle to the window */
2279 @REPLY
2280 data_size_t total_size; /* total size of the resulting region */
2281 VARARG(region,rectangles); /* list of rectangles for the region */
2282 @END
2285 /* Set the window region */
2286 @REQ(set_window_region)
2287 user_handle_t window; /* handle to the window */
2288 int redraw; /* redraw the window? */
2289 VARARG(region,rectangles); /* list of rectangles for the region */
2290 @END
2293 /* Get the window update region */
2294 @REQ(get_update_region)
2295 user_handle_t window; /* handle to the window */
2296 user_handle_t from_child; /* child to start searching from */
2297 unsigned int flags; /* update flags (see below) */
2298 @REPLY
2299 user_handle_t child; /* child to repaint (or window itself) */
2300 unsigned int flags; /* resulting update flags (see below) */
2301 data_size_t total_size; /* total size of the resulting region */
2302 VARARG(region,rectangles); /* list of rectangles for the region */
2303 @END
2304 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2305 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2306 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2307 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2308 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2309 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2310 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2311 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2314 /* Update the z order of a window so that a given rectangle is fully visible */
2315 @REQ(update_window_zorder)
2316 user_handle_t window; /* handle to the window */
2317 rectangle_t rect; /* rectangle that must be visible */
2318 @END
2321 /* Mark parts of a window as needing a redraw */
2322 @REQ(redraw_window)
2323 user_handle_t window; /* handle to the window */
2324 unsigned int flags; /* RDW_* flags */
2325 VARARG(region,rectangles); /* list of rectangles for the region */
2326 @END
2329 /* Set a window property */
2330 @REQ(set_window_property)
2331 user_handle_t window; /* handle to the window */
2332 atom_t atom; /* property atom (if no name specified) */
2333 obj_handle_t handle; /* handle to store */
2334 VARARG(name,unicode_str); /* property name */
2335 @END
2338 /* Remove a window property */
2339 @REQ(remove_window_property)
2340 user_handle_t window; /* handle to the window */
2341 atom_t atom; /* property atom (if no name specified) */
2342 VARARG(name,unicode_str); /* property name */
2343 @REPLY
2344 obj_handle_t handle; /* handle stored in property */
2345 @END
2348 /* Get a window property */
2349 @REQ(get_window_property)
2350 user_handle_t window; /* handle to the window */
2351 atom_t atom; /* property atom (if no name specified) */
2352 VARARG(name,unicode_str); /* property name */
2353 @REPLY
2354 obj_handle_t handle; /* handle stored in property */
2355 @END
2358 /* Get the list of properties of a window */
2359 @REQ(get_window_properties)
2360 user_handle_t window; /* handle to the window */
2361 @REPLY
2362 int total; /* total number of properties */
2363 VARARG(props,properties); /* list of properties */
2364 @END
2367 /* Create a window station */
2368 @REQ(create_winstation)
2369 unsigned int flags; /* window station flags */
2370 unsigned int access; /* wanted access rights */
2371 unsigned int attributes; /* object attributes */
2372 VARARG(name,unicode_str); /* object name */
2373 @REPLY
2374 obj_handle_t handle; /* handle to the window station */
2375 @END
2378 /* Open a handle to a window station */
2379 @REQ(open_winstation)
2380 unsigned int access; /* wanted access rights */
2381 unsigned int attributes; /* object attributes */
2382 VARARG(name,unicode_str); /* object name */
2383 @REPLY
2384 obj_handle_t handle; /* handle to the window station */
2385 @END
2388 /* Close a window station */
2389 @REQ(close_winstation)
2390 obj_handle_t handle; /* handle to the window station */
2391 @END
2394 /* Get the process current window station */
2395 @REQ(get_process_winstation)
2396 @REPLY
2397 obj_handle_t handle; /* handle to the window station */
2398 @END
2401 /* Set the process current window station */
2402 @REQ(set_process_winstation)
2403 obj_handle_t handle; /* handle to the window station */
2404 @END
2407 /* Create a desktop */
2408 @REQ(create_desktop)
2409 unsigned int flags; /* desktop flags */
2410 unsigned int access; /* wanted access rights */
2411 unsigned int attributes; /* object attributes */
2412 VARARG(name,unicode_str); /* object name */
2413 @REPLY
2414 obj_handle_t handle; /* handle to the desktop */
2415 @END
2418 /* Open a handle to a desktop */
2419 @REQ(open_desktop)
2420 unsigned int flags; /* desktop flags */
2421 unsigned int access; /* wanted access rights */
2422 unsigned int attributes; /* object attributes */
2423 VARARG(name,unicode_str); /* object name */
2424 @REPLY
2425 obj_handle_t handle; /* handle to the desktop */
2426 @END
2429 /* Close a desktop */
2430 @REQ(close_desktop)
2431 obj_handle_t handle; /* handle to the desktop */
2432 @END
2435 /* Get the thread current desktop */
2436 @REQ(get_thread_desktop)
2437 thread_id_t tid; /* thread id */
2438 @REPLY
2439 obj_handle_t handle; /* handle to the desktop */
2440 @END
2443 /* Set the thread current desktop */
2444 @REQ(set_thread_desktop)
2445 obj_handle_t handle; /* handle to the desktop */
2446 @END
2449 /* Get/set information about a user object (window station or desktop) */
2450 @REQ(set_user_object_info)
2451 obj_handle_t handle; /* handle to the object */
2452 unsigned int flags; /* information to set */
2453 unsigned int obj_flags; /* new object flags */
2454 @REPLY
2455 int is_desktop; /* is object a desktop? */
2456 unsigned int old_obj_flags; /* old object flags */
2457 VARARG(name,unicode_str); /* object name */
2458 @END
2459 #define SET_USER_OBJECT_FLAGS 1
2462 /* Attach (or detach) thread inputs */
2463 @REQ(attach_thread_input)
2464 thread_id_t tid_from; /* thread to be attached */
2465 thread_id_t tid_to; /* thread to which tid_from should be attached */
2466 int attach; /* is it an attach? */
2467 @END
2470 /* Get input data for a given thread */
2471 @REQ(get_thread_input)
2472 thread_id_t tid; /* id of thread */
2473 @REPLY
2474 user_handle_t focus; /* handle to the focus window */
2475 user_handle_t capture; /* handle to the capture window */
2476 user_handle_t active; /* handle to the active window */
2477 user_handle_t foreground; /* handle to the global foreground window */
2478 user_handle_t menu_owner; /* handle to the menu owner */
2479 user_handle_t move_size; /* handle to the moving/resizing window */
2480 user_handle_t caret; /* handle to the caret window */
2481 rectangle_t rect; /* caret rectangle */
2482 @END
2485 /* Get the time of the last input event */
2486 @REQ(get_last_input_time)
2487 @REPLY
2488 unsigned int time;
2489 @END
2492 /* Retrieve queue keyboard state for a given thread */
2493 @REQ(get_key_state)
2494 thread_id_t tid; /* id of thread */
2495 int key; /* optional key code or -1 */
2496 @REPLY
2497 unsigned char state; /* state of specified key */
2498 VARARG(keystate,bytes); /* state array for all the keys */
2499 @END
2501 /* Set queue keyboard state for a given thread */
2502 @REQ(set_key_state)
2503 thread_id_t tid; /* id of thread */
2504 VARARG(keystate,bytes); /* state array for all the keys */
2505 @END
2507 /* Set the system foreground window */
2508 @REQ(set_foreground_window)
2509 user_handle_t handle; /* handle to the foreground window */
2510 @REPLY
2511 user_handle_t previous; /* handle to the previous foreground window */
2512 int send_msg_old; /* whether we have to send a msg to the old window */
2513 int send_msg_new; /* whether we have to send a msg to the new window */
2514 @END
2516 /* Set the current thread focus window */
2517 @REQ(set_focus_window)
2518 user_handle_t handle; /* handle to the focus window */
2519 @REPLY
2520 user_handle_t previous; /* handle to the previous focus window */
2521 @END
2523 /* Set the current thread active window */
2524 @REQ(set_active_window)
2525 user_handle_t handle; /* handle to the active window */
2526 @REPLY
2527 user_handle_t previous; /* handle to the previous active window */
2528 @END
2530 /* Set the current thread capture window */
2531 @REQ(set_capture_window)
2532 user_handle_t handle; /* handle to the capture window */
2533 unsigned int flags; /* capture flags (see below) */
2534 @REPLY
2535 user_handle_t previous; /* handle to the previous capture window */
2536 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2537 @END
2538 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2539 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2542 /* Set the current thread caret window */
2543 @REQ(set_caret_window)
2544 user_handle_t handle; /* handle to the caret window */
2545 int width; /* caret width */
2546 int height; /* caret height */
2547 @REPLY
2548 user_handle_t previous; /* handle to the previous caret window */
2549 rectangle_t old_rect; /* previous caret rectangle */
2550 int old_hide; /* previous hide count */
2551 int old_state; /* previous caret state (1=on, 0=off) */
2552 @END
2555 /* Set the current thread caret information */
2556 @REQ(set_caret_info)
2557 unsigned int flags; /* caret flags (see below) */
2558 user_handle_t handle; /* handle to the caret window */
2559 int x; /* caret x position */
2560 int y; /* caret y position */
2561 int hide; /* increment for hide count (can be negative to show it) */
2562 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2563 @REPLY
2564 user_handle_t full_handle; /* handle to the current caret window */
2565 rectangle_t old_rect; /* previous caret rectangle */
2566 int old_hide; /* previous hide count */
2567 int old_state; /* previous caret state (1=on, 0=off) */
2568 @END
2569 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2570 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2571 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2574 /* Set a window hook */
2575 @REQ(set_hook)
2576 int id; /* id of the hook */
2577 process_id_t pid; /* id of process to set the hook into */
2578 thread_id_t tid; /* id of thread to set the hook into */
2579 int event_min;
2580 int event_max;
2581 int flags;
2582 void* proc; /* hook procedure */
2583 int unicode; /* is it a unicode hook? */
2584 VARARG(module,unicode_str); /* module name */
2585 @REPLY
2586 user_handle_t handle; /* handle to the hook */
2587 unsigned int active_hooks; /* active hooks bitmap */
2588 @END
2591 /* Remove a window hook */
2592 @REQ(remove_hook)
2593 user_handle_t handle; /* handle to the hook */
2594 int id; /* id of the hook if handle is 0 */
2595 void* proc; /* hook procedure if handle is 0 */
2596 @REPLY
2597 unsigned int active_hooks; /* active hooks bitmap */
2598 @END
2601 /* Start calling a hook chain */
2602 @REQ(start_hook_chain)
2603 int id; /* id of the hook */
2604 int event; /* signalled event */
2605 user_handle_t window; /* handle to the event window */
2606 int object_id; /* object id for out of context winevent */
2607 int child_id; /* child id for out of context winevent */
2608 @REPLY
2609 user_handle_t handle; /* handle to the next hook */
2610 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2611 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2612 void* proc; /* hook procedure */
2613 int unicode; /* is it a unicode hook? */
2614 unsigned int active_hooks; /* active hooks bitmap */
2615 VARARG(module,unicode_str); /* module name */
2616 @END
2619 /* Finished calling a hook chain */
2620 @REQ(finish_hook_chain)
2621 int id; /* id of the hook */
2622 @END
2625 /* Get the hook information */
2626 @REQ(get_hook_info)
2627 user_handle_t handle; /* handle to the current hook */
2628 int get_next; /* do we want info about current or next hook? */
2629 int event; /* signalled event */
2630 user_handle_t window; /* handle to the event window */
2631 int object_id; /* object id for out of context winevent */
2632 int child_id; /* child id for out of context winevent */
2633 @REPLY
2634 user_handle_t handle; /* handle to the hook */
2635 int id; /* id of the hook */
2636 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2637 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2638 void* proc; /* hook procedure */
2639 int unicode; /* is it a unicode hook? */
2640 VARARG(module,unicode_str); /* module name */
2641 @END
2644 /* Create a window class */
2645 @REQ(create_class)
2646 int local; /* is it a local class? */
2647 atom_t atom; /* class atom */
2648 unsigned int style; /* class style */
2649 void* instance; /* module instance */
2650 int extra; /* number of extra class bytes */
2651 int win_extra; /* number of window extra bytes */
2652 void* client_ptr; /* pointer to class in client address space */
2653 @END
2656 /* Destroy a window class */
2657 @REQ(destroy_class)
2658 atom_t atom; /* class atom */
2659 void* instance; /* module instance */
2660 @REPLY
2661 void* client_ptr; /* pointer to class in client address space */
2662 @END
2665 /* Set some information in a class */
2666 @REQ(set_class_info)
2667 user_handle_t window; /* handle to the window */
2668 unsigned int flags; /* flags for info to set (see below) */
2669 atom_t atom; /* class atom */
2670 unsigned int style; /* class style */
2671 int win_extra; /* number of window extra bytes */
2672 void* instance; /* module instance */
2673 int extra_offset; /* offset to set in extra bytes */
2674 data_size_t extra_size; /* size to set in extra bytes */
2675 unsigned long extra_value; /* value to set in extra bytes */
2676 @REPLY
2677 atom_t old_atom; /* previous class atom */
2678 unsigned int old_style; /* previous class style */
2679 int old_extra; /* previous number of class extra bytes */
2680 int old_win_extra; /* previous number of window extra bytes */
2681 void* old_instance; /* previous module instance */
2682 unsigned long old_extra_value; /* old value in extra bytes */
2683 @END
2684 #define SET_CLASS_ATOM 0x0001
2685 #define SET_CLASS_STYLE 0x0002
2686 #define SET_CLASS_WINEXTRA 0x0004
2687 #define SET_CLASS_INSTANCE 0x0008
2688 #define SET_CLASS_EXTRA 0x0010
2691 /* Set/get clipboard information */
2692 @REQ(set_clipboard_info)
2693 unsigned int flags; /* flags for fields to set (see below) */
2694 user_handle_t clipboard; /* clipboard window */
2695 user_handle_t owner; /* clipboard owner */
2696 user_handle_t viewer; /* first clipboard viewer */
2697 unsigned int seqno; /* change sequence number */
2698 @REPLY
2699 unsigned int flags; /* status flags (see below) */
2700 user_handle_t old_clipboard; /* old clipboard window */
2701 user_handle_t old_owner; /* old clipboard owner */
2702 user_handle_t old_viewer; /* old clipboard viewer */
2703 unsigned int seqno; /* current sequence number */
2704 @END
2706 #define SET_CB_OPEN 0x001
2707 #define SET_CB_OWNER 0x002
2708 #define SET_CB_VIEWER 0x004
2709 #define SET_CB_SEQNO 0x008
2710 #define SET_CB_RELOWNER 0x010
2711 #define SET_CB_CLOSE 0x020
2712 #define CB_OPEN 0x040
2713 #define CB_OWNER 0x080
2714 #define CB_PROCESS 0x100
2717 /* Open a security token */
2718 @REQ(open_token)
2719 obj_handle_t handle; /* handle to the thread or process */
2720 unsigned int access; /* access rights to the new token */
2721 unsigned int attributes;/* object attributes */
2722 unsigned int flags; /* flags (see below) */
2723 @REPLY
2724 obj_handle_t token; /* handle to the token */
2725 @END
2726 #define OPEN_TOKEN_THREAD 1
2727 #define OPEN_TOKEN_AS_SELF 2
2730 /* Set/get the global windows */
2731 @REQ(set_global_windows)
2732 unsigned int flags; /* flags for fields to set (see below) */
2733 user_handle_t shell_window; /* handle to the new shell window */
2734 user_handle_t shell_listview; /* handle to the new shell listview window */
2735 user_handle_t progman_window; /* handle to the new program manager window */
2736 user_handle_t taskman_window; /* handle to the new task manager window */
2737 @REPLY
2738 user_handle_t old_shell_window; /* handle to the shell window */
2739 user_handle_t old_shell_listview; /* handle to the shell listview window */
2740 user_handle_t old_progman_window; /* handle to the new program manager window */
2741 user_handle_t old_taskman_window; /* handle to the new task manager window */
2742 @END
2743 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2744 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2745 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2747 /* Adjust the privileges held by a token */
2748 @REQ(adjust_token_privileges)
2749 obj_handle_t handle; /* handle to the token */
2750 int disable_all; /* disable all privileges? */
2751 int get_modified_state; /* get modified privileges? */
2752 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2753 @REPLY
2754 unsigned int len; /* total length in bytes required to store token privileges */
2755 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2756 @END
2758 /* Retrieves the set of privileges held by or available to a token */
2759 @REQ(get_token_privileges)
2760 obj_handle_t handle; /* handle to the token */
2761 @REPLY
2762 unsigned int len; /* total length in bytes required to store token privileges */
2763 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2764 @END
2766 /* Check the token has the required privileges */
2767 @REQ(check_token_privileges)
2768 obj_handle_t handle; /* handle to the token */
2769 int all_required; /* are all the privileges required for the check to succeed? */
2770 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2771 @REPLY
2772 int has_privileges; /* does the token have the required privileges? */
2773 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2774 @END
2776 @REQ(duplicate_token)
2777 obj_handle_t handle; /* handle to the token to duplicate */
2778 unsigned int access; /* access rights to the new token */
2779 unsigned int attributes; /* object attributes */
2780 int primary; /* is the new token to be a primary one? */
2781 int impersonation_level; /* impersonation level of the new token */
2782 @REPLY
2783 obj_handle_t new_handle; /* duplicated handle */
2784 @END
2786 @REQ(access_check)
2787 obj_handle_t handle; /* handle to the token */
2788 unsigned int desired_access; /* desired access to the object */
2789 unsigned int mapping_read; /* mapping from generic read to specific rights */
2790 unsigned int mapping_write; /* mapping from generic write to specific rights */
2791 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2792 unsigned int mapping_all; /* mapping from generic all to specific rights */
2793 VARARG(sd,security_descriptor); /* security descriptor to check */
2794 @REPLY
2795 unsigned int access_granted; /* access rights actually granted */
2796 unsigned int access_status; /* was access granted? */
2797 unsigned int privileges_len; /* length needed to store privileges */
2798 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2799 @END
2801 @REQ(get_token_user)
2802 obj_handle_t handle; /* handle to the token */
2803 @REPLY
2804 data_size_t user_len; /* length needed to store user */
2805 VARARG(user,SID); /* sid of the user the token represents */
2806 @END
2808 @REQ(get_token_groups)
2809 obj_handle_t handle; /* handle to the token */
2810 @REPLY
2811 data_size_t user_len; /* length needed to store user */
2812 VARARG(user,token_groups); /* groups the token's user belongs to */
2813 @END
2815 @REQ(set_security_object)
2816 obj_handle_t handle; /* handle to the object */
2817 unsigned int security_info; /* which parts of security descriptor to set */
2818 VARARG(sd,security_descriptor); /* security descriptor to set */
2819 @END
2821 @REQ(get_security_object)
2822 obj_handle_t handle; /* handle to the object */
2823 unsigned int security_info; /* which parts of security descriptor to get */
2824 @REPLY
2825 unsigned int sd_len; /* buffer size needed for sd */
2826 VARARG(sd,security_descriptor); /* retrieved security descriptor */
2827 @END
2829 /* Create a mailslot */
2830 @REQ(create_mailslot)
2831 unsigned int access; /* wanted access rights */
2832 unsigned int attributes; /* object attributes */
2833 obj_handle_t rootdir; /* root directory */
2834 unsigned int max_msgsize;
2835 timeout_t read_timeout;
2836 VARARG(name,unicode_str); /* mailslot name */
2837 @REPLY
2838 obj_handle_t handle; /* handle to the mailslot */
2839 @END
2842 /* Set mailslot information */
2843 @REQ(set_mailslot_info)
2844 obj_handle_t handle; /* handle to the mailslot */
2845 unsigned int flags;
2846 timeout_t read_timeout;
2847 @REPLY
2848 unsigned int max_msgsize;
2849 timeout_t read_timeout;
2850 @END
2851 #define MAILSLOT_SET_READ_TIMEOUT 1
2854 /* Create a directory object */
2855 @REQ(create_directory)
2856 unsigned int access; /* access flags */
2857 unsigned int attributes; /* object attributes */
2858 obj_handle_t rootdir; /* root directory */
2859 VARARG(directory_name,unicode_str); /* Directory name */
2860 @REPLY
2861 obj_handle_t handle; /* handle to the directory */
2862 @END
2865 /* Open a directory object */
2866 @REQ(open_directory)
2867 unsigned int access; /* access flags */
2868 unsigned int attributes; /* object attributes */
2869 obj_handle_t rootdir; /* root directory */
2870 VARARG(directory_name,unicode_str); /* Directory name */
2871 @REPLY
2872 obj_handle_t handle; /* handle to the directory */
2873 @END
2876 /* Create a symbolic link object */
2877 @REQ(create_symlink)
2878 unsigned int access; /* access flags */
2879 unsigned int attributes; /* object attributes */
2880 obj_handle_t rootdir; /* root directory */
2881 data_size_t name_len; /* length of the symlink name in bytes */
2882 VARARG(name,unicode_str,name_len); /* symlink name */
2883 VARARG(target_name,unicode_str); /* target name */
2884 @REPLY
2885 obj_handle_t handle; /* handle to the symlink */
2886 @END
2889 /* Open a symbolic link object */
2890 @REQ(open_symlink)
2891 unsigned int access; /* access flags */
2892 unsigned int attributes; /* object attributes */
2893 obj_handle_t rootdir; /* root directory */
2894 VARARG(name,unicode_str); /* symlink name */
2895 @REPLY
2896 obj_handle_t handle; /* handle to the symlink */
2897 @END
2900 /* Query a symbolic link object */
2901 @REQ(query_symlink)
2902 obj_handle_t handle; /* handle to the symlink */
2903 @REPLY
2904 VARARG(target_name,unicode_str); /* target name */
2905 @END
2908 /* Query basic object information */
2909 @REQ(get_object_info)
2910 obj_handle_t handle; /* handle to the object */
2911 @REPLY
2912 unsigned int access; /* granted access mask */
2913 unsigned int ref_count; /* object ref count */
2914 @END
2916 /* Query the impersonation level of an impersonation token */
2917 @REQ(get_token_impersonation_level)
2918 obj_handle_t handle; /* handle to the object */
2919 @REPLY
2920 int impersonation_level; /* impersonation level of the impersonation token */
2921 @END
2923 /* Allocate a locally-unique identifier */
2924 @REQ(allocate_locally_unique_id)
2925 @REPLY
2926 luid_t luid;
2927 @END
2930 /* Create a device manager */
2931 @REQ(create_device_manager)
2932 unsigned int access; /* wanted access rights */
2933 unsigned int attributes; /* object attributes */
2934 @REPLY
2935 obj_handle_t handle; /* handle to the device */
2936 @END
2939 /* Create a device */
2940 @REQ(create_device)
2941 unsigned int access; /* wanted access rights */
2942 unsigned int attributes; /* object attributes */
2943 obj_handle_t rootdir; /* root directory */
2944 obj_handle_t manager; /* device manager */
2945 void* user_ptr; /* opaque ptr for use by client */
2946 VARARG(name,unicode_str); /* object name */
2947 @REPLY
2948 obj_handle_t handle; /* handle to the device */
2949 @END
2952 /* Delete a device */
2953 @REQ(delete_device)
2954 obj_handle_t handle; /* handle to the device */
2955 @END
2958 /* Retrieve the next pending device ioctl request */
2959 @REQ(get_next_device_request)
2960 obj_handle_t manager; /* handle to the device manager */
2961 obj_handle_t prev; /* handle to the previous ioctl */
2962 unsigned int status; /* status of the previous ioctl */
2963 VARARG(prev_data,bytes); /* output data of the previous ioctl */
2964 @REPLY
2965 obj_handle_t next; /* handle to the next ioctl */
2966 ioctl_code_t code; /* ioctl code */
2967 void* user_ptr; /* opaque ptr for the device */
2968 data_size_t in_size; /* total needed input size */
2969 data_size_t out_size; /* needed output size */
2970 VARARG(next_data,bytes); /* input data of the next ioctl */
2971 @END
2974 /* Make the current process a system process */
2975 @REQ(make_process_system)
2976 @REPLY
2977 obj_handle_t event; /* event signaled when all user processes have exited */
2978 @END
2981 /* Get detailed fixed-size information about a token */
2982 @REQ(get_token_statistics)
2983 obj_handle_t handle; /* handle to the object */
2984 @REPLY
2985 luid_t token_id; /* locally-unique identifier of the token */
2986 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
2987 int primary; /* is the token primary or impersonation? */
2988 int impersonation_level; /* level of impersonation */
2989 int group_count; /* the number of groups the token is a member of */
2990 int privilege_count; /* the number of privileges the token has */
2991 @END
2994 /* Create I/O completion port */
2995 @REQ(create_completion)
2996 unsigned int access; /* desired access to a port */
2997 unsigned int attributes; /* object attributes */
2998 unsigned int concurrent; /* max number of concurrent active threads */
2999 obj_handle_t rootdir; /* root directory */
3000 VARARG(filename,string); /* port name */
3001 @REPLY
3002 obj_handle_t handle; /* port handle */
3003 @END
3006 /* Open I/O completion port */
3007 @REQ(open_completion)
3008 unsigned int access; /* desired access to a port */
3009 unsigned int attributes; /* object attributes */
3010 obj_handle_t rootdir; /* root directory */
3011 VARARG(filename,string); /* port name */
3012 @REPLY
3013 obj_handle_t handle; /* port handle */
3014 @END
3017 /* add completion to completion port */
3018 @REQ(add_completion)
3019 obj_handle_t handle; /* port handle */
3020 unsigned long ckey; /* completion key */
3021 unsigned long cvalue; /* completion value */
3022 unsigned long information; /* IO_STATUS_BLOCK Information */
3023 unsigned int status; /* completion result */
3024 @END
3027 /* get completion from completion port queue */
3028 @REQ(remove_completion)
3029 obj_handle_t handle; /* port handle */
3030 @REPLY
3031 unsigned long ckey; /* completion key */
3032 unsigned long cvalue; /* completion value */
3033 unsigned long information; /* IO_STATUS_BLOCK Information */
3034 unsigned int status; /* completion result */
3035 @END
3038 /* get completion queue depth */
3039 @REQ(query_completion)
3040 obj_handle_t handle; /* port handle */
3041 @REPLY
3042 unsigned int depth; /* completion queue depth */
3043 @END
3046 /* associate object with completion port */
3047 @REQ(set_completion_info)
3048 obj_handle_t handle; /* object handle */
3049 obj_handle_t chandle; /* port handle */
3050 unsigned long ckey; /* completion key */
3051 @END