push bcb7aac2ad8ce1eb95b435457e718333bdd0d626
[wine/hacks.git] / server / protocol.def
blobd32cbfc979ed90724d9f4417b8e42cb88dc9e066
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 /* VARARG(owner,SID); */
231 /* VARARG(group,SID); */
232 /* VARARG(sacl,ACL); */
233 /* VARARG(dacl,ACL); */
236 struct object_attributes
238 obj_handle_t rootdir; /* root directory */
239 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
240 /* VARARG(sd,security_descriptor); */
241 /* VARARG(name,unicode_str); */
244 struct token_groups
246 unsigned int count;
247 /* unsigned int attributes[count]; */
248 /* VARARG(sids,SID); */
251 enum apc_type
253 APC_NONE,
254 APC_USER,
255 APC_TIMER,
256 APC_ASYNC_IO,
257 APC_VIRTUAL_ALLOC,
258 APC_VIRTUAL_FREE,
259 APC_VIRTUAL_QUERY,
260 APC_VIRTUAL_PROTECT,
261 APC_VIRTUAL_FLUSH,
262 APC_VIRTUAL_LOCK,
263 APC_VIRTUAL_UNLOCK,
264 APC_MAP_VIEW,
265 APC_UNMAP_VIEW,
266 APC_CREATE_THREAD
269 typedef union
271 enum apc_type type;
272 struct
274 enum apc_type type; /* APC_USER */
275 void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
276 unsigned long args[3]; /* arguments for user function */
277 } user;
278 struct
280 enum apc_type type; /* APC_TIMER */
281 void (__stdcall *func)(void*, unsigned int, unsigned int);
282 timeout_t time; /* absolute time of expiration */
283 void *arg; /* user argument */
284 } timer;
285 struct
287 enum apc_type type; /* APC_ASYNC_IO */
288 unsigned int (*func)(void*, void*, unsigned int);
289 void *user; /* user pointer */
290 void *sb; /* status block */
291 unsigned int status; /* I/O status */
292 } async_io;
293 struct
295 enum apc_type type; /* APC_VIRTUAL_ALLOC */
296 void *addr; /* requested address */
297 unsigned long size; /* allocation size */
298 unsigned int zero_bits; /* allocation alignment */
299 unsigned int op_type; /* type of operation */
300 unsigned int prot; /* memory protection flags */
301 } virtual_alloc;
302 struct
304 enum apc_type type; /* APC_VIRTUAL_FREE */
305 void *addr; /* requested address */
306 unsigned long size; /* allocation size */
307 unsigned int op_type; /* type of operation */
308 } virtual_free;
309 struct
311 enum apc_type type; /* APC_VIRTUAL_QUERY */
312 const void *addr; /* requested address */
313 } virtual_query;
314 struct
316 enum apc_type type; /* APC_VIRTUAL_PROTECT */
317 void *addr; /* requested address */
318 unsigned long size; /* requested address */
319 unsigned int prot; /* new protection flags */
320 } virtual_protect;
321 struct
323 enum apc_type type; /* APC_VIRTUAL_FLUSH */
324 const void *addr; /* requested address */
325 unsigned long size; /* requested address */
326 } virtual_flush;
327 struct
329 enum apc_type type; /* APC_VIRTUAL_LOCK */
330 void *addr; /* requested address */
331 unsigned long size; /* requested address */
332 } virtual_lock;
333 struct
335 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
336 void *addr; /* requested address */
337 unsigned long size; /* requested address */
338 } virtual_unlock;
339 struct
341 enum apc_type type; /* APC_MAP_VIEW */
342 obj_handle_t handle; /* mapping handle */
343 void *addr; /* requested address */
344 unsigned long size; /* allocation size */
345 file_pos_t offset; /* file offset */
346 unsigned int zero_bits; /* allocation alignment */
347 unsigned int alloc_type;/* allocation type */
348 unsigned int prot; /* memory protection flags */
349 } map_view;
350 struct
352 enum apc_type type; /* APC_UNMAP_VIEW */
353 void *addr; /* view address */
354 } unmap_view;
355 struct
357 enum apc_type type; /* APC_CREATE_THREAD */
358 void (__stdcall *func)(void*); /* start function */
359 void *arg; /* argument for start function */
360 unsigned long reserve; /* reserve size for thread stack */
361 unsigned long commit; /* commit size for thread stack */
362 int suspend; /* suspended thread? */
363 } create_thread;
364 } apc_call_t;
366 typedef union
368 enum apc_type type;
369 struct
371 enum apc_type type; /* APC_ASYNC_IO */
372 unsigned int status; /* new status of async operation */
373 } async_io;
374 struct
376 enum apc_type type; /* APC_VIRTUAL_ALLOC */
377 unsigned int status; /* status returned by call */
378 void *addr; /* resulting address */
379 unsigned long size; /* resulting size */
380 } virtual_alloc;
381 struct
383 enum apc_type type; /* APC_VIRTUAL_FREE */
384 unsigned int status; /* status returned by call */
385 void *addr; /* resulting address */
386 unsigned long size; /* resulting size */
387 } virtual_free;
388 struct
390 enum apc_type type; /* APC_VIRTUAL_QUERY */
391 unsigned int status; /* status returned by call */
392 void *base; /* resulting base address */
393 void *alloc_base;/* resulting allocation base */
394 unsigned long size; /* resulting region size */
395 unsigned int state; /* resulting region state */
396 unsigned int prot; /* resulting region protection */
397 unsigned int alloc_prot;/* resulting allocation protection */
398 unsigned int alloc_type;/* resulting region allocation type */
399 } virtual_query;
400 struct
402 enum apc_type type; /* APC_VIRTUAL_PROTECT */
403 unsigned int status; /* status returned by call */
404 void *addr; /* resulting address */
405 unsigned long size; /* resulting size */
406 unsigned int prot; /* old protection flags */
407 } virtual_protect;
408 struct
410 enum apc_type type; /* APC_VIRTUAL_FLUSH */
411 unsigned int status; /* status returned by call */
412 const void *addr; /* resulting address */
413 unsigned long size; /* resulting size */
414 } virtual_flush;
415 struct
417 enum apc_type type; /* APC_VIRTUAL_LOCK */
418 unsigned int status; /* status returned by call */
419 void *addr; /* resulting address */
420 unsigned long size; /* resulting size */
421 } virtual_lock;
422 struct
424 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
425 unsigned int status; /* status returned by call */
426 void *addr; /* resulting address */
427 unsigned long size; /* resulting size */
428 } virtual_unlock;
429 struct
431 enum apc_type type; /* APC_MAP_VIEW */
432 unsigned int status; /* status returned by call */
433 void *addr; /* resulting address */
434 unsigned long size; /* resulting size */
435 } map_view;
436 struct
438 enum apc_type type; /* APC_MAP_VIEW */
439 unsigned int status; /* status returned by call */
440 } unmap_view;
441 struct
443 enum apc_type type; /* APC_CREATE_THREAD */
444 unsigned int status; /* status returned by call */
445 thread_id_t tid; /* thread id */
446 obj_handle_t handle; /* handle to new thread */
447 } create_thread;
448 } apc_result_t;
450 /****************************************************************/
451 /* Request declarations */
453 /* Create a new process from the context of the parent */
454 @REQ(new_process)
455 int inherit_all; /* inherit all handles from parent */
456 unsigned int create_flags; /* creation flags */
457 int socket_fd; /* file descriptor for process socket */
458 obj_handle_t exe_file; /* file handle for main exe */
459 obj_handle_t hstdin; /* handle for stdin */
460 obj_handle_t hstdout; /* handle for stdout */
461 obj_handle_t hstderr; /* handle for stderr */
462 unsigned int process_access; /* access rights for process object */
463 unsigned int process_attr; /* attributes for process object */
464 unsigned int thread_access; /* access rights for thread object */
465 unsigned int thread_attr; /* attributes for thread object */
466 VARARG(info,startup_info); /* startup information */
467 VARARG(env,unicode_str); /* environment for new process */
468 @REPLY
469 obj_handle_t info; /* new process info handle */
470 process_id_t pid; /* process id */
471 obj_handle_t phandle; /* process handle (in the current process) */
472 thread_id_t tid; /* thread id */
473 obj_handle_t thandle; /* thread handle (in the current process) */
474 @END
477 /* Retrieve information about a newly started process */
478 @REQ(get_new_process_info)
479 obj_handle_t info; /* info handle returned from new_process_request */
480 @REPLY
481 int success; /* did the process start successfully? */
482 int exit_code; /* process exit code if failed */
483 @END
486 /* Create a new thread from the context of the parent */
487 @REQ(new_thread)
488 unsigned int access; /* wanted access rights */
489 unsigned int attributes; /* object attributes */
490 int suspend; /* new thread should be suspended on creation */
491 int request_fd; /* fd for request pipe */
492 @REPLY
493 thread_id_t tid; /* thread id */
494 obj_handle_t handle; /* thread handle (in the current process) */
495 @END
498 /* Retrieve the new process startup info */
499 @REQ(get_startup_info)
500 @REPLY
501 obj_handle_t exe_file; /* file handle for main exe */
502 obj_handle_t hstdin; /* handle for stdin */
503 obj_handle_t hstdout; /* handle for stdout */
504 obj_handle_t hstderr; /* handle for stderr */
505 VARARG(info,startup_info); /* startup information */
506 VARARG(env,unicode_str); /* environment */
507 @END
510 /* Signal the end of the process initialization */
511 @REQ(init_process_done)
512 void* module; /* main module base address */
513 void* entry; /* process entry point */
514 int gui; /* is it a GUI process? */
515 @END
518 /* Initialize a thread; called from the child after fork()/clone() */
519 @REQ(init_thread)
520 int unix_pid; /* Unix pid of new thread */
521 int unix_tid; /* Unix tid of new thread */
522 int debug_level; /* new debug level */
523 void* teb; /* TEB of new thread (in thread address space) */
524 void* peb; /* address of PEB (in thread address space) */
525 void* entry; /* thread entry point (in thread address space) */
526 void* ldt_copy; /* address of LDT copy (in thread address space) */
527 int reply_fd; /* fd for reply pipe */
528 int wait_fd; /* fd for blocking calls pipe */
529 @REPLY
530 process_id_t pid; /* process id of the new thread's process */
531 thread_id_t tid; /* thread id of the new thread */
532 data_size_t info_size; /* total size of startup info */
533 timeout_t server_start; /* server start time */
534 int version; /* protocol version */
535 @END
538 /* Terminate a process */
539 @REQ(terminate_process)
540 obj_handle_t handle; /* process handle to terminate */
541 int exit_code; /* process exit code */
542 @REPLY
543 int self; /* suicide? */
544 @END
547 /* Terminate a thread */
548 @REQ(terminate_thread)
549 obj_handle_t handle; /* thread handle to terminate */
550 int exit_code; /* thread exit code */
551 @REPLY
552 int self; /* suicide? */
553 int last; /* last thread in this process? */
554 @END
557 /* Retrieve information about a process */
558 @REQ(get_process_info)
559 obj_handle_t handle; /* process handle */
560 @REPLY
561 process_id_t pid; /* server process id */
562 process_id_t ppid; /* server process id of parent */
563 int exit_code; /* process exit code */
564 int priority; /* priority class */
565 int affinity; /* process affinity mask */
566 void* peb; /* PEB address in process address space */
567 timeout_t start_time; /* process start time */
568 timeout_t end_time; /* process end time */
569 @END
572 /* Set a process informations */
573 @REQ(set_process_info)
574 obj_handle_t handle; /* process handle */
575 int mask; /* setting mask (see below) */
576 int priority; /* priority class */
577 int affinity; /* affinity mask */
578 @END
579 #define SET_PROCESS_INFO_PRIORITY 0x01
580 #define SET_PROCESS_INFO_AFFINITY 0x02
583 /* Retrieve information about a thread */
584 @REQ(get_thread_info)
585 obj_handle_t handle; /* thread handle */
586 thread_id_t tid_in; /* thread id (optional) */
587 @REPLY
588 process_id_t pid; /* server process id */
589 thread_id_t tid; /* server thread id */
590 void* teb; /* thread teb pointer */
591 int exit_code; /* thread exit code */
592 int priority; /* thread priority level */
593 int affinity; /* thread affinity mask */
594 timeout_t creation_time; /* thread creation time */
595 timeout_t exit_time; /* thread exit time */
596 int last; /* last thread in process */
597 @END
600 /* Set a thread informations */
601 @REQ(set_thread_info)
602 obj_handle_t handle; /* thread handle */
603 int mask; /* setting mask (see below) */
604 int priority; /* priority class */
605 int affinity; /* affinity mask */
606 obj_handle_t token; /* impersonation token */
607 @END
608 #define SET_THREAD_INFO_PRIORITY 0x01
609 #define SET_THREAD_INFO_AFFINITY 0x02
610 #define SET_THREAD_INFO_TOKEN 0x04
613 /* Retrieve information about a module */
614 @REQ(get_dll_info)
615 obj_handle_t handle; /* process handle */
616 void* base_address; /* base address of module */
617 @REPLY
618 size_t size; /* module size */
619 void* entry_point;
620 VARARG(filename,unicode_str); /* file name of module */
621 @END
624 /* Suspend a thread */
625 @REQ(suspend_thread)
626 obj_handle_t handle; /* thread handle */
627 @REPLY
628 int count; /* new suspend count */
629 @END
632 /* Resume a thread */
633 @REQ(resume_thread)
634 obj_handle_t handle; /* thread handle */
635 @REPLY
636 int count; /* new suspend count */
637 @END
640 /* Notify the server that a dll has been loaded */
641 @REQ(load_dll)
642 obj_handle_t handle; /* file handle */
643 void* base; /* base address */
644 size_t size; /* dll size */
645 int dbg_offset; /* debug info offset */
646 int dbg_size; /* debug info size */
647 void* name; /* ptr to ptr to name (in process addr space) */
648 VARARG(filename,unicode_str); /* file name of dll */
649 @END
652 /* Notify the server that a dll is being unloaded */
653 @REQ(unload_dll)
654 void* base; /* base address */
655 @END
658 /* Queue an APC for a thread or process */
659 @REQ(queue_apc)
660 obj_handle_t thread; /* thread handle */
661 obj_handle_t process; /* process handle */
662 apc_call_t call; /* call arguments */
663 @REPLY
664 obj_handle_t handle; /* APC handle */
665 int self; /* run APC in caller itself? */
666 @END
669 /* Get the result of an APC call */
670 @REQ(get_apc_result)
671 obj_handle_t handle; /* handle to the APC */
672 @REPLY
673 apc_result_t result; /* result of the APC */
674 @END
677 /* Close a handle for the current process */
678 @REQ(close_handle)
679 obj_handle_t handle; /* handle to close */
680 @END
683 /* Set a handle information */
684 @REQ(set_handle_info)
685 obj_handle_t handle; /* handle we are interested in */
686 int flags; /* new handle flags */
687 int mask; /* mask for flags to set */
688 @REPLY
689 int old_flags; /* old flag value */
690 @END
693 /* Duplicate a handle */
694 @REQ(dup_handle)
695 obj_handle_t src_process; /* src process handle */
696 obj_handle_t src_handle; /* src handle to duplicate */
697 obj_handle_t dst_process; /* dst process handle */
698 unsigned int access; /* wanted access rights */
699 unsigned int attributes; /* object attributes */
700 unsigned int options; /* duplicate options (see below) */
701 @REPLY
702 obj_handle_t handle; /* duplicated handle in dst process */
703 int self; /* is the source the current process? */
704 int closed; /* whether the source handle has been closed */
705 @END
706 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
707 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
708 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
711 /* Open a handle to a process */
712 @REQ(open_process)
713 process_id_t pid; /* process id to open */
714 unsigned int access; /* wanted access rights */
715 unsigned int attributes; /* object attributes */
716 @REPLY
717 obj_handle_t handle; /* handle to the process */
718 @END
721 /* Open a handle to a thread */
722 @REQ(open_thread)
723 thread_id_t tid; /* thread id to open */
724 unsigned int access; /* wanted access rights */
725 unsigned int attributes; /* object attributes */
726 @REPLY
727 obj_handle_t handle; /* handle to the thread */
728 @END
731 /* Wait for handles */
732 @REQ(select)
733 int flags; /* wait flags (see below) */
734 void* cookie; /* magic cookie to return to client */
735 obj_handle_t signal; /* object to signal (0 if none) */
736 obj_handle_t prev_apc; /* handle to previous APC */
737 timeout_t timeout; /* timeout */
738 VARARG(result,apc_result); /* result of previous APC */
739 VARARG(handles,handles); /* handles to select on */
740 @REPLY
741 obj_handle_t apc_handle; /* handle to next APC */
742 timeout_t timeout; /* timeout converted to absolute */
743 apc_call_t call; /* APC call arguments */
744 @END
745 #define SELECT_ALL 1
746 #define SELECT_ALERTABLE 2
747 #define SELECT_INTERRUPTIBLE 4
750 /* Create an event */
751 @REQ(create_event)
752 unsigned int access; /* wanted access rights */
753 unsigned int attributes; /* object attributes */
754 int manual_reset; /* manual reset event */
755 int initial_state; /* initial state of the event */
756 VARARG(objattr,object_attributes); /* object attributes */
757 @REPLY
758 obj_handle_t handle; /* handle to the event */
759 @END
761 /* Event operation */
762 @REQ(event_op)
763 obj_handle_t handle; /* handle to event */
764 int op; /* event operation (see below) */
765 @END
766 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
769 /* Open an event */
770 @REQ(open_event)
771 unsigned int access; /* wanted access rights */
772 unsigned int attributes; /* object attributes */
773 obj_handle_t rootdir; /* root directory */
774 VARARG(name,unicode_str); /* object name */
775 @REPLY
776 obj_handle_t handle; /* handle to the event */
777 @END
780 /* Create a mutex */
781 @REQ(create_mutex)
782 unsigned int access; /* wanted access rights */
783 unsigned int attributes; /* object attributes */
784 int owned; /* initially owned? */
785 VARARG(objattr,object_attributes); /* object attributes */
786 @REPLY
787 obj_handle_t handle; /* handle to the mutex */
788 @END
791 /* Release a mutex */
792 @REQ(release_mutex)
793 obj_handle_t handle; /* handle to the mutex */
794 @REPLY
795 unsigned int prev_count; /* value of internal counter, before release */
796 @END
799 /* Open a mutex */
800 @REQ(open_mutex)
801 unsigned int access; /* wanted access rights */
802 unsigned int attributes; /* object attributes */
803 obj_handle_t rootdir; /* root directory */
804 VARARG(name,unicode_str); /* object name */
805 @REPLY
806 obj_handle_t handle; /* handle to the mutex */
807 @END
810 /* Create a semaphore */
811 @REQ(create_semaphore)
812 unsigned int access; /* wanted access rights */
813 unsigned int attributes; /* object attributes */
814 unsigned int initial; /* initial count */
815 unsigned int max; /* maximum count */
816 VARARG(objattr,object_attributes); /* object attributes */
817 @REPLY
818 obj_handle_t handle; /* handle to the semaphore */
819 @END
822 /* Release a semaphore */
823 @REQ(release_semaphore)
824 obj_handle_t handle; /* handle to the semaphore */
825 unsigned int count; /* count to add to semaphore */
826 @REPLY
827 unsigned int prev_count; /* previous semaphore count */
828 @END
831 /* Open a semaphore */
832 @REQ(open_semaphore)
833 unsigned int access; /* wanted access rights */
834 unsigned int attributes; /* object attributes */
835 obj_handle_t rootdir; /* root directory */
836 VARARG(name,unicode_str); /* object name */
837 @REPLY
838 obj_handle_t handle; /* handle to the semaphore */
839 @END
842 /* Create a file */
843 @REQ(create_file)
844 unsigned int access; /* wanted access rights */
845 unsigned int attributes; /* object attributes */
846 unsigned int sharing; /* sharing flags */
847 int create; /* file create action */
848 unsigned int options; /* file options */
849 unsigned int attrs; /* file attributes for creation */
850 VARARG(filename,string); /* file name */
851 @REPLY
852 obj_handle_t handle; /* handle to the file */
853 @END
856 /* Open a file object */
857 @REQ(open_file_object)
858 unsigned int access; /* wanted access rights */
859 unsigned int attributes; /* open attributes */
860 obj_handle_t rootdir; /* root directory */
861 unsigned int sharing; /* sharing flags */
862 unsigned int options; /* file options */
863 VARARG(filename,unicode_str); /* file name */
864 @REPLY
865 obj_handle_t handle; /* handle to the file */
866 @END
869 /* Allocate a file handle for a Unix fd */
870 @REQ(alloc_file_handle)
871 unsigned int access; /* wanted access rights */
872 unsigned int attributes; /* object attributes */
873 int fd; /* file descriptor on the client side */
874 @REPLY
875 obj_handle_t handle; /* handle to the file */
876 @END
879 /* Get a Unix fd to access a file */
880 @REQ(get_handle_fd)
881 obj_handle_t handle; /* handle to the file */
882 @REPLY
883 int type; /* file type (see below) */
884 int removable; /* is file removable? */
885 unsigned int access; /* file access rights */
886 unsigned int options; /* file open options */
887 @END
888 enum server_fd_type
890 FD_TYPE_INVALID, /* invalid file (no associated fd) */
891 FD_TYPE_FILE, /* regular file */
892 FD_TYPE_DIR, /* directory */
893 FD_TYPE_SOCKET, /* socket */
894 FD_TYPE_SERIAL, /* serial port */
895 FD_TYPE_PIPE, /* named pipe */
896 FD_TYPE_MAILSLOT, /* mailslot */
897 FD_TYPE_CHAR, /* unspecified char device */
898 FD_TYPE_DEVICE, /* Windows device file */
899 FD_TYPE_NB_TYPES
903 /* Flush a file buffers */
904 @REQ(flush_file)
905 obj_handle_t handle; /* handle to the file */
906 @REPLY
907 obj_handle_t event; /* event set when finished */
908 @END
911 /* Lock a region of a file */
912 @REQ(lock_file)
913 obj_handle_t handle; /* handle to the file */
914 file_pos_t offset; /* offset of start of lock */
915 file_pos_t count; /* count of bytes to lock */
916 int shared; /* shared or exclusive lock? */
917 int wait; /* do we want to wait? */
918 @REPLY
919 obj_handle_t handle; /* handle to wait on */
920 int overlapped; /* is it an overlapped I/O handle? */
921 @END
924 /* Unlock a region of a file */
925 @REQ(unlock_file)
926 obj_handle_t handle; /* handle to the file */
927 file_pos_t offset; /* offset of start of unlock */
928 file_pos_t count; /* count of bytes to unlock */
929 @END
932 /* Create a socket */
933 @REQ(create_socket)
934 unsigned int access; /* wanted access rights */
935 unsigned int attributes; /* object attributes */
936 int family; /* family, see socket manpage */
937 int type; /* type, see socket manpage */
938 int protocol; /* protocol, see socket manpage */
939 unsigned int flags; /* socket flags */
940 @REPLY
941 obj_handle_t handle; /* handle to the new socket */
942 @END
945 /* Accept a socket */
946 @REQ(accept_socket)
947 obj_handle_t lhandle; /* handle to the listening socket */
948 unsigned int access; /* wanted access rights */
949 unsigned int attributes; /* object attributes */
950 @REPLY
951 obj_handle_t handle; /* handle to the new socket */
952 @END
955 /* Set socket event parameters */
956 @REQ(set_socket_event)
957 obj_handle_t handle; /* handle to the socket */
958 unsigned int mask; /* event mask */
959 obj_handle_t event; /* event object */
960 user_handle_t window; /* window to send the message to */
961 unsigned int msg; /* message to send */
962 @END
965 /* Get socket event parameters */
966 @REQ(get_socket_event)
967 obj_handle_t handle; /* handle to the socket */
968 int service; /* clear pending? */
969 obj_handle_t c_event; /* event to clear */
970 @REPLY
971 unsigned int mask; /* event mask */
972 unsigned int pmask; /* pending events */
973 unsigned int state; /* status bits */
974 VARARG(errors,ints); /* event errors */
975 @END
978 /* Reenable pending socket events */
979 @REQ(enable_socket_event)
980 obj_handle_t handle; /* handle to the socket */
981 unsigned int mask; /* events to re-enable */
982 unsigned int sstate; /* status bits to set */
983 unsigned int cstate; /* status bits to clear */
984 @END
986 @REQ(set_socket_deferred)
987 obj_handle_t handle; /* handle to the socket */
988 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
989 @END
991 /* Allocate a console (only used by a console renderer) */
992 @REQ(alloc_console)
993 unsigned int access; /* wanted access rights */
994 unsigned int attributes; /* object attributes */
995 process_id_t pid; /* pid of process which shall be attached to the console */
996 @REPLY
997 obj_handle_t handle_in; /* handle to console input */
998 obj_handle_t event; /* handle to renderer events change notification */
999 @END
1002 /* Free the console of the current process */
1003 @REQ(free_console)
1004 @END
1007 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1008 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1009 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1010 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1011 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1012 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1013 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1014 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1015 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1016 struct console_renderer_event
1018 short event;
1019 union
1021 struct update
1023 short top;
1024 short bottom;
1025 } update;
1026 struct resize
1028 short width;
1029 short height;
1030 } resize;
1031 struct cursor_pos
1033 short x;
1034 short y;
1035 } cursor_pos;
1036 struct cursor_geom
1038 short visible;
1039 short size;
1040 } cursor_geom;
1041 struct display
1043 short left;
1044 short top;
1045 short width;
1046 short height;
1047 } display;
1048 } u;
1051 /* retrieve console events for the renderer */
1052 @REQ(get_console_renderer_events)
1053 obj_handle_t handle; /* handle to console input events */
1054 @REPLY
1055 VARARG(data,bytes); /* the various console_renderer_events */
1056 @END
1059 /* Open a handle to the process console */
1060 @REQ(open_console)
1061 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1062 /* otherwise console_in handle to get active screen buffer? */
1063 unsigned int access; /* wanted access rights */
1064 unsigned int attributes; /* object attributes */
1065 int share; /* share mask (only for output handles) */
1066 @REPLY
1067 obj_handle_t handle; /* handle to the console */
1068 @END
1071 /* Get the input queue wait event */
1072 @REQ(get_console_wait_event)
1073 @REPLY
1074 obj_handle_t handle;
1075 @END
1077 /* Get a console mode (input or output) */
1078 @REQ(get_console_mode)
1079 obj_handle_t handle; /* handle to the console */
1080 @REPLY
1081 int mode; /* console mode */
1082 @END
1085 /* Set a console mode (input or output) */
1086 @REQ(set_console_mode)
1087 obj_handle_t handle; /* handle to the console */
1088 int mode; /* console mode */
1089 @END
1092 /* Set info about a console (input only) */
1093 @REQ(set_console_input_info)
1094 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1095 int mask; /* setting mask (see below) */
1096 obj_handle_t active_sb; /* active screen buffer */
1097 int history_mode; /* whether we duplicate lines in history */
1098 int history_size; /* number of lines in history */
1099 int edition_mode; /* index to the edition mode flavors */
1100 int input_cp; /* console input codepage */
1101 int output_cp; /* console output codepage */
1102 user_handle_t win; /* console window if backend supports it */
1103 VARARG(title,unicode_str); /* console title */
1104 @END
1105 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1106 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1107 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1108 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1109 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1110 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1111 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1112 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1115 /* Get info about a console (input only) */
1116 @REQ(get_console_input_info)
1117 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1118 @REPLY
1119 int history_mode; /* whether we duplicate lines in history */
1120 int history_size; /* number of lines in history */
1121 int history_index; /* number of used lines in history */
1122 int edition_mode; /* index to the edition mode flavors */
1123 int input_cp; /* console input codepage */
1124 int output_cp; /* console output codepage */
1125 user_handle_t win; /* console window if backend supports it */
1126 VARARG(title,unicode_str); /* console title */
1127 @END
1130 /* appends a string to console's history */
1131 @REQ(append_console_input_history)
1132 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1133 VARARG(line,unicode_str); /* line to add */
1134 @END
1137 /* appends a string to console's history */
1138 @REQ(get_console_input_history)
1139 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1140 int index; /* index to get line from */
1141 @REPLY
1142 int total; /* total length of line in Unicode chars */
1143 VARARG(line,unicode_str); /* line to add */
1144 @END
1147 /* creates a new screen buffer on process' console */
1148 @REQ(create_console_output)
1149 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1150 unsigned int access; /* wanted access rights */
1151 unsigned int attributes; /* object attributes */
1152 unsigned int share; /* sharing credentials */
1153 @REPLY
1154 obj_handle_t handle_out; /* handle to the screen buffer */
1155 @END
1158 /* Set info about a console (output only) */
1159 @REQ(set_console_output_info)
1160 obj_handle_t handle; /* handle to the console */
1161 int mask; /* setting mask (see below) */
1162 short int cursor_size; /* size of cursor (percentage filled) */
1163 short int cursor_visible;/* cursor visibility flag */
1164 short int cursor_x; /* position of cursor (x, y) */
1165 short int cursor_y;
1166 short int width; /* width of the screen buffer */
1167 short int height; /* height of the screen buffer */
1168 short int attr; /* default attribute */
1169 short int win_left; /* window actually displayed by renderer */
1170 short int win_top; /* the rect area is expressed withing the */
1171 short int win_right; /* boundaries of the screen buffer */
1172 short int win_bottom;
1173 short int max_width; /* maximum size (width x height) for the window */
1174 short int max_height;
1175 @END
1176 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1177 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1178 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1179 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1180 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1181 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1184 /* Get info about a console (output only) */
1185 @REQ(get_console_output_info)
1186 obj_handle_t handle; /* handle to the console */
1187 @REPLY
1188 short int cursor_size; /* size of cursor (percentage filled) */
1189 short int cursor_visible;/* cursor visibility flag */
1190 short int cursor_x; /* position of cursor (x, y) */
1191 short int cursor_y;
1192 short int width; /* width of the screen buffer */
1193 short int height; /* height of the screen buffer */
1194 short int attr; /* default attribute */
1195 short int win_left; /* window actually displayed by renderer */
1196 short int win_top; /* the rect area is expressed withing the */
1197 short int win_right; /* boundaries of the screen buffer */
1198 short int win_bottom;
1199 short int max_width; /* maximum size (width x height) for the window */
1200 short int max_height;
1201 @END
1203 /* Add input records to a console input queue */
1204 @REQ(write_console_input)
1205 obj_handle_t handle; /* handle to the console input */
1206 VARARG(rec,input_records); /* input records */
1207 @REPLY
1208 int written; /* number of records written */
1209 @END
1212 /* Fetch input records from a console input queue */
1213 @REQ(read_console_input)
1214 obj_handle_t handle; /* handle to the console input */
1215 int flush; /* flush the retrieved records from the queue? */
1216 @REPLY
1217 int read; /* number of records read */
1218 VARARG(rec,input_records); /* input records */
1219 @END
1222 /* write data (chars and/or attributes) in a screen buffer */
1223 @REQ(write_console_output)
1224 obj_handle_t handle; /* handle to the console output */
1225 int x; /* position where to start writing */
1226 int y;
1227 int mode; /* char info (see below) */
1228 int wrap; /* wrap around at end of line? */
1229 VARARG(data,bytes); /* info to write */
1230 @REPLY
1231 int written; /* number of char infos actually written */
1232 int width; /* width of screen buffer */
1233 int height; /* height of screen buffer */
1234 @END
1235 enum char_info_mode
1237 CHAR_INFO_MODE_TEXT, /* characters only */
1238 CHAR_INFO_MODE_ATTR, /* attributes only */
1239 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1240 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1244 /* fill a screen buffer with constant data (chars and/or attributes) */
1245 @REQ(fill_console_output)
1246 obj_handle_t handle; /* handle to the console output */
1247 int x; /* position where to start writing */
1248 int y;
1249 int mode; /* char info mode */
1250 int count; /* number to write */
1251 int wrap; /* wrap around at end of line? */
1252 char_info_t data; /* data to write */
1253 @REPLY
1254 int written; /* number of char infos actually written */
1255 @END
1258 /* read data (chars and/or attributes) from a screen buffer */
1259 @REQ(read_console_output)
1260 obj_handle_t handle; /* handle to the console output */
1261 int x; /* position (x,y) where to start reading */
1262 int y;
1263 int mode; /* char info mode */
1264 int wrap; /* wrap around at end of line? */
1265 @REPLY
1266 int width; /* width of screen buffer */
1267 int height; /* height of screen buffer */
1268 VARARG(data,bytes);
1269 @END
1272 /* move a rect (of data) in screen buffer content */
1273 @REQ(move_console_output)
1274 obj_handle_t handle; /* handle to the console output */
1275 short int x_src; /* position (x, y) of rect to start moving from */
1276 short int y_src;
1277 short int x_dst; /* position (x, y) of rect to move to */
1278 short int y_dst;
1279 short int w; /* size of the rect (width, height) to move */
1280 short int h;
1281 @END
1284 /* Sends a signal to a process group */
1285 @REQ(send_console_signal)
1286 int signal; /* the signal to send */
1287 process_id_t group_id; /* the group to send the signal to */
1288 @END
1291 /* enable directory change notifications */
1292 @REQ(read_directory_changes)
1293 unsigned int filter; /* notification filter */
1294 obj_handle_t handle; /* handle to the directory */
1295 int subtree; /* watch the subtree? */
1296 int want_data; /* flag indicating whether change data should be collected */
1297 async_data_t async; /* async I/O parameters */
1298 @END
1301 @REQ(read_change)
1302 obj_handle_t handle;
1303 @REPLY
1304 int action; /* type of change */
1305 VARARG(name,string); /* name of directory entry that changed */
1306 @END
1309 /* Create a file mapping */
1310 @REQ(create_mapping)
1311 unsigned int access; /* wanted access rights */
1312 unsigned int attributes; /* object attributes */
1313 file_pos_t size; /* mapping size */
1314 int protect; /* protection flags (see below) */
1315 obj_handle_t file_handle; /* file handle */
1316 VARARG(objattr,object_attributes); /* object attributes */
1317 @REPLY
1318 obj_handle_t handle; /* handle to the mapping */
1319 @END
1320 /* protection flags */
1321 #define VPROT_READ 0x01
1322 #define VPROT_WRITE 0x02
1323 #define VPROT_EXEC 0x04
1324 #define VPROT_WRITECOPY 0x08
1325 #define VPROT_GUARD 0x10
1326 #define VPROT_NOCACHE 0x20
1327 #define VPROT_COMMITTED 0x40
1328 #define VPROT_IMAGE 0x80
1331 /* Open a mapping */
1332 @REQ(open_mapping)
1333 unsigned int access; /* wanted access rights */
1334 unsigned int attributes; /* object attributes */
1335 obj_handle_t rootdir; /* root directory */
1336 VARARG(name,unicode_str); /* object name */
1337 @REPLY
1338 obj_handle_t handle; /* handle to the mapping */
1339 @END
1342 /* Get information about a file mapping */
1343 @REQ(get_mapping_info)
1344 obj_handle_t handle; /* handle to the mapping */
1345 @REPLY
1346 file_pos_t size; /* mapping size */
1347 int protect; /* protection flags */
1348 int header_size; /* header size (for VPROT_IMAGE mapping) */
1349 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1350 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1351 obj_handle_t shared_file; /* shared mapping file handle */
1352 @END
1355 #define SNAP_HEAPLIST 0x00000001
1356 #define SNAP_PROCESS 0x00000002
1357 #define SNAP_THREAD 0x00000004
1358 #define SNAP_MODULE 0x00000008
1359 /* Create a snapshot */
1360 @REQ(create_snapshot)
1361 unsigned int attributes; /* object attributes */
1362 int flags; /* snapshot flags (SNAP_*) */
1363 process_id_t pid; /* process id */
1364 @REPLY
1365 obj_handle_t handle; /* handle to the snapshot */
1366 @END
1369 /* Get the next process from a snapshot */
1370 @REQ(next_process)
1371 obj_handle_t handle; /* handle to the snapshot */
1372 int reset; /* reset snapshot position? */
1373 @REPLY
1374 int count; /* process usage count */
1375 process_id_t pid; /* process id */
1376 process_id_t ppid; /* parent process id */
1377 void* heap; /* heap base */
1378 void* module; /* main module */
1379 int threads; /* number of threads */
1380 int priority; /* process priority */
1381 int handles; /* number of handles */
1382 VARARG(filename,unicode_str); /* file name of main exe */
1383 @END
1386 /* Get the next thread from a snapshot */
1387 @REQ(next_thread)
1388 obj_handle_t handle; /* handle to the snapshot */
1389 int reset; /* reset snapshot position? */
1390 @REPLY
1391 int count; /* thread usage count */
1392 process_id_t pid; /* process id */
1393 thread_id_t tid; /* thread id */
1394 int base_pri; /* base priority */
1395 int delta_pri; /* delta priority */
1396 @END
1399 /* Get the next module from a snapshot */
1400 @REQ(next_module)
1401 obj_handle_t handle; /* handle to the snapshot */
1402 int reset; /* reset snapshot position? */
1403 @REPLY
1404 process_id_t pid; /* process id */
1405 void* base; /* module base address */
1406 size_t size; /* module size */
1407 VARARG(filename,unicode_str); /* file name of module */
1408 @END
1411 /* Wait for a debug event */
1412 @REQ(wait_debug_event)
1413 int get_handle; /* should we alloc a handle for waiting? */
1414 @REPLY
1415 process_id_t pid; /* process id */
1416 thread_id_t tid; /* thread id */
1417 obj_handle_t wait; /* wait handle if no event ready */
1418 VARARG(event,debug_event); /* debug event data */
1419 @END
1422 /* Queue an exception event */
1423 @REQ(queue_exception_event)
1424 int first; /* first chance exception? */
1425 VARARG(record,exc_event); /* thread context followed by exception record */
1426 @REPLY
1427 obj_handle_t handle; /* handle to the queued event */
1428 @END
1431 /* Retrieve the status of an exception event */
1432 @REQ(get_exception_status)
1433 obj_handle_t handle; /* handle to the queued event */
1434 @REPLY
1435 VARARG(context,context); /* modified thread context */
1436 @END
1439 /* Send an output string to the debugger */
1440 @REQ(output_debug_string)
1441 void* string; /* string to display (in debugged process address space) */
1442 int unicode; /* is it Unicode? */
1443 int length; /* string length */
1444 @END
1447 /* Continue a debug event */
1448 @REQ(continue_debug_event)
1449 process_id_t pid; /* process id to continue */
1450 thread_id_t tid; /* thread id to continue */
1451 int status; /* continuation status */
1452 @END
1455 /* Start/stop debugging an existing process */
1456 @REQ(debug_process)
1457 process_id_t pid; /* id of the process to debug */
1458 int attach; /* 1=attaching / 0=detaching from the process */
1459 @END
1462 /* Simulate a breakpoint in a process */
1463 @REQ(debug_break)
1464 obj_handle_t handle; /* process handle */
1465 @REPLY
1466 int self; /* was it the caller itself? */
1467 @END
1470 /* Set debugger kill on exit flag */
1471 @REQ(set_debugger_kill_on_exit)
1472 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1473 @END
1476 /* Read data from a process address space */
1477 @REQ(read_process_memory)
1478 obj_handle_t handle; /* process handle */
1479 void* addr; /* addr to read from */
1480 @REPLY
1481 VARARG(data,bytes); /* result data */
1482 @END
1485 /* Write data to a process address space */
1486 @REQ(write_process_memory)
1487 obj_handle_t handle; /* process handle */
1488 void* addr; /* addr to write to */
1489 VARARG(data,bytes); /* data to write */
1490 @END
1493 /* Create a registry key */
1494 @REQ(create_key)
1495 obj_handle_t parent; /* handle to the parent key */
1496 unsigned int access; /* desired access rights */
1497 unsigned int attributes; /* object attributes */
1498 unsigned int options; /* creation options */
1499 time_t modif; /* last modification time */
1500 data_size_t namelen; /* length of key name in bytes */
1501 VARARG(name,unicode_str,namelen); /* key name */
1502 VARARG(class,unicode_str); /* class name */
1503 @REPLY
1504 obj_handle_t hkey; /* handle to the created key */
1505 int created; /* has it been newly created? */
1506 @END
1508 /* Open a registry key */
1509 @REQ(open_key)
1510 obj_handle_t parent; /* handle to the parent key */
1511 unsigned int access; /* desired access rights */
1512 unsigned int attributes; /* object attributes */
1513 VARARG(name,unicode_str); /* key name */
1514 @REPLY
1515 obj_handle_t hkey; /* handle to the open key */
1516 @END
1519 /* Delete a registry key */
1520 @REQ(delete_key)
1521 obj_handle_t hkey; /* handle to the key */
1522 @END
1525 /* Flush a registry key */
1526 @REQ(flush_key)
1527 obj_handle_t hkey; /* handle to the key */
1528 @END
1531 /* Enumerate registry subkeys */
1532 @REQ(enum_key)
1533 obj_handle_t hkey; /* handle to registry key */
1534 int index; /* index of subkey (or -1 for current key) */
1535 int info_class; /* requested information class */
1536 @REPLY
1537 int subkeys; /* number of subkeys */
1538 int max_subkey; /* longest subkey name */
1539 int max_class; /* longest class name */
1540 int values; /* number of values */
1541 int max_value; /* longest value name */
1542 int max_data; /* longest value data */
1543 time_t modif; /* last modification time */
1544 data_size_t total; /* total length needed for full name and class */
1545 data_size_t namelen; /* length of key name in bytes */
1546 VARARG(name,unicode_str,namelen); /* key name */
1547 VARARG(class,unicode_str); /* class name */
1548 @END
1551 /* Set a value of a registry key */
1552 @REQ(set_key_value)
1553 obj_handle_t hkey; /* handle to registry key */
1554 int type; /* value type */
1555 data_size_t namelen; /* length of value name in bytes */
1556 VARARG(name,unicode_str,namelen); /* value name */
1557 VARARG(data,bytes); /* value data */
1558 @END
1561 /* Retrieve the value of a registry key */
1562 @REQ(get_key_value)
1563 obj_handle_t hkey; /* handle to registry key */
1564 VARARG(name,unicode_str); /* value name */
1565 @REPLY
1566 int type; /* value type */
1567 data_size_t total; /* total length needed for data */
1568 VARARG(data,bytes); /* value data */
1569 @END
1572 /* Enumerate a value of a registry key */
1573 @REQ(enum_key_value)
1574 obj_handle_t hkey; /* handle to registry key */
1575 int index; /* value index */
1576 int info_class; /* requested information class */
1577 @REPLY
1578 int type; /* value type */
1579 data_size_t total; /* total length needed for full name and data */
1580 data_size_t namelen; /* length of value name in bytes */
1581 VARARG(name,unicode_str,namelen); /* value name */
1582 VARARG(data,bytes); /* value data */
1583 @END
1586 /* Delete a value of a registry key */
1587 @REQ(delete_key_value)
1588 obj_handle_t hkey; /* handle to registry key */
1589 VARARG(name,unicode_str); /* value name */
1590 @END
1593 /* Load a registry branch from a file */
1594 @REQ(load_registry)
1595 obj_handle_t hkey; /* root key to load to */
1596 obj_handle_t file; /* file to load from */
1597 VARARG(name,unicode_str); /* subkey name */
1598 @END
1601 /* UnLoad a registry branch from a file */
1602 @REQ(unload_registry)
1603 obj_handle_t hkey; /* root key to unload to */
1604 @END
1607 /* Save a registry branch to a file */
1608 @REQ(save_registry)
1609 obj_handle_t hkey; /* key to save */
1610 obj_handle_t file; /* file to save to */
1611 @END
1614 /* Add a registry key change notification */
1615 @REQ(set_registry_notification)
1616 obj_handle_t hkey; /* key to watch for changes */
1617 obj_handle_t event; /* event to set */
1618 int subtree; /* should we watch the whole subtree? */
1619 unsigned int filter; /* things to watch */
1620 @END
1623 /* Create a waitable timer */
1624 @REQ(create_timer)
1625 unsigned int access; /* wanted access rights */
1626 unsigned int attributes; /* object attributes */
1627 obj_handle_t rootdir; /* root directory */
1628 int manual; /* manual reset */
1629 VARARG(name,unicode_str); /* object name */
1630 @REPLY
1631 obj_handle_t handle; /* handle to the timer */
1632 @END
1635 /* Open a waitable timer */
1636 @REQ(open_timer)
1637 unsigned int access; /* wanted access rights */
1638 unsigned int attributes; /* object attributes */
1639 obj_handle_t rootdir; /* root directory */
1640 VARARG(name,unicode_str); /* object name */
1641 @REPLY
1642 obj_handle_t handle; /* handle to the timer */
1643 @END
1645 /* Set a waitable timer */
1646 @REQ(set_timer)
1647 obj_handle_t handle; /* handle to the timer */
1648 timeout_t expire; /* next expiration absolute time */
1649 int period; /* timer period in ms */
1650 void* callback; /* callback function */
1651 void* arg; /* callback argument */
1652 @REPLY
1653 int signaled; /* was the timer signaled before this call ? */
1654 @END
1656 /* Cancel a waitable timer */
1657 @REQ(cancel_timer)
1658 obj_handle_t handle; /* handle to the timer */
1659 @REPLY
1660 int signaled; /* was the timer signaled before this calltime ? */
1661 @END
1663 /* Get information on a waitable timer */
1664 @REQ(get_timer_info)
1665 obj_handle_t handle; /* handle to the timer */
1666 @REPLY
1667 timeout_t when; /* absolute time when the timer next expires */
1668 int signaled; /* is the timer signaled? */
1669 @END
1672 /* Retrieve the current context of a thread */
1673 @REQ(get_thread_context)
1674 obj_handle_t handle; /* thread handle */
1675 unsigned int flags; /* context flags */
1676 int suspend; /* if getting context during suspend */
1677 @REPLY
1678 int self; /* was it a handle to the current thread? */
1679 VARARG(context,context); /* thread context */
1680 @END
1683 /* Set the current context of a thread */
1684 @REQ(set_thread_context)
1685 obj_handle_t handle; /* thread handle */
1686 unsigned int flags; /* context flags */
1687 int suspend; /* if setting context during suspend */
1688 VARARG(context,context); /* thread context */
1689 @REPLY
1690 int self; /* was it a handle to the current thread? */
1691 @END
1694 /* Fetch a selector entry for a thread */
1695 @REQ(get_selector_entry)
1696 obj_handle_t handle; /* thread handle */
1697 int entry; /* LDT entry */
1698 @REPLY
1699 unsigned int base; /* selector base */
1700 unsigned int limit; /* selector limit */
1701 unsigned char flags; /* selector flags */
1702 @END
1705 /* Add an atom */
1706 @REQ(add_atom)
1707 obj_handle_t table; /* which table to add atom to */
1708 VARARG(name,unicode_str); /* atom name */
1709 @REPLY
1710 atom_t atom; /* resulting atom */
1711 @END
1714 /* Delete an atom */
1715 @REQ(delete_atom)
1716 obj_handle_t table; /* which table to delete atom from */
1717 atom_t atom; /* atom handle */
1718 @END
1721 /* Find an atom */
1722 @REQ(find_atom)
1723 obj_handle_t table; /* which table to find atom from */
1724 VARARG(name,unicode_str); /* atom name */
1725 @REPLY
1726 atom_t atom; /* atom handle */
1727 @END
1730 /* Get information about an atom */
1731 @REQ(get_atom_information)
1732 obj_handle_t table; /* which table to find atom from */
1733 atom_t atom; /* atom handle */
1734 @REPLY
1735 int count; /* atom lock count */
1736 int pinned; /* whether the atom has been pinned */
1737 data_size_t total; /* actual length of atom name */
1738 VARARG(name,unicode_str); /* atom name */
1739 @END
1742 /* Set information about an atom */
1743 @REQ(set_atom_information)
1744 obj_handle_t table; /* which table to find atom from */
1745 atom_t atom; /* atom handle */
1746 int pinned; /* whether to bump atom information */
1747 @END
1750 /* Empty an atom table */
1751 @REQ(empty_atom_table)
1752 obj_handle_t table; /* which table to find atom from */
1753 int if_pinned; /* whether to delete pinned atoms */
1754 @END
1757 /* Init an atom table */
1758 @REQ(init_atom_table)
1759 int entries; /* number of entries (only for local) */
1760 @REPLY
1761 obj_handle_t table; /* handle to the atom table */
1762 @END
1765 /* Get the message queue of the current thread */
1766 @REQ(get_msg_queue)
1767 @REPLY
1768 obj_handle_t handle; /* handle to the queue */
1769 @END
1772 /* Set the file descriptor associated to the current thread queue */
1773 @REQ(set_queue_fd)
1774 obj_handle_t handle; /* handle to the file descriptor */
1775 @END
1778 /* Set the current message queue wakeup mask */
1779 @REQ(set_queue_mask)
1780 unsigned int wake_mask; /* wakeup bits mask */
1781 unsigned int changed_mask; /* changed bits mask */
1782 int skip_wait; /* will we skip waiting if signaled? */
1783 @REPLY
1784 unsigned int wake_bits; /* current wake bits */
1785 unsigned int changed_bits; /* current changed bits */
1786 @END
1789 /* Get the current message queue status */
1790 @REQ(get_queue_status)
1791 int clear; /* should we clear the change bits? */
1792 @REPLY
1793 unsigned int wake_bits; /* wake bits */
1794 unsigned int changed_bits; /* changed bits since last time */
1795 @END
1798 /* Retrieve the process idle event */
1799 @REQ(get_process_idle_event)
1800 obj_handle_t handle; /* process handle */
1801 @REPLY
1802 obj_handle_t event; /* handle to idle event */
1803 @END
1806 /* Send a message to a thread queue */
1807 @REQ(send_message)
1808 thread_id_t id; /* thread id */
1809 int type; /* message type (see below) */
1810 int flags; /* message flags (see below) */
1811 user_handle_t win; /* window handle */
1812 unsigned int msg; /* message code */
1813 unsigned long wparam; /* parameters */
1814 unsigned long lparam; /* parameters */
1815 timeout_t timeout; /* timeout for reply */
1816 VARARG(data,message_data); /* message data for sent messages */
1817 @END
1819 @REQ(post_quit_message)
1820 int exit_code; /* exit code to return */
1821 @END
1823 enum message_type
1825 MSG_ASCII, /* Ascii message (from SendMessageA) */
1826 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1827 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1828 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1829 MSG_CALLBACK_RESULT,/* result of a callback message */
1830 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1831 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1832 MSG_HARDWARE, /* hardware message */
1833 MSG_WINEVENT /* winevent message */
1835 #define SEND_MSG_ABORT_IF_HUNG 0x01
1838 /* Send a hardware message to a thread queue */
1839 @REQ(send_hardware_message)
1840 thread_id_t id; /* thread id */
1841 user_handle_t win; /* window handle */
1842 unsigned int msg; /* message code */
1843 unsigned int time; /* message time */
1844 unsigned long wparam; /* parameters */
1845 unsigned long lparam; /* parameters */
1846 unsigned long info; /* extra info */
1847 int x; /* x position */
1848 int y; /* y position */
1849 @END
1852 /* Get a message from the current queue */
1853 @REQ(get_message)
1854 unsigned int flags; /* PM_* flags */
1855 user_handle_t get_win; /* window handle to get */
1856 unsigned int get_first; /* first message code to get */
1857 unsigned int get_last; /* last message code to get */
1858 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1859 unsigned int wake_mask; /* wakeup bits mask */
1860 unsigned int changed_mask; /* changed bits mask */
1861 @REPLY
1862 user_handle_t win; /* window handle */
1863 int type; /* message type */
1864 unsigned int msg; /* message code */
1865 unsigned long wparam; /* parameters */
1866 unsigned long lparam; /* parameters */
1867 unsigned long info; /* extra info */
1868 int x; /* x position */
1869 int y; /* y position */
1870 unsigned int time; /* message time */
1871 unsigned int hw_id; /* id if hardware message */
1872 unsigned int active_hooks; /* active hooks bitmap */
1873 data_size_t total; /* total size of extra data */
1874 VARARG(data,message_data); /* message data for sent messages */
1875 @END
1878 /* Reply to a sent message */
1879 @REQ(reply_message)
1880 unsigned long result; /* message result */
1881 int remove; /* should we remove the message? */
1882 VARARG(data,bytes); /* message data for sent messages */
1883 @END
1886 /* Accept the current hardware message */
1887 @REQ(accept_hardware_message)
1888 unsigned int hw_id; /* id of the hardware message */
1889 int remove; /* should we remove the message? */
1890 user_handle_t new_win; /* new destination window for current message */
1891 @END
1894 /* Retrieve the reply for the last message sent */
1895 @REQ(get_message_reply)
1896 int cancel; /* cancel message if not ready? */
1897 @REPLY
1898 unsigned long result; /* message result */
1899 VARARG(data,bytes); /* message data for sent messages */
1900 @END
1903 /* Set a window timer */
1904 @REQ(set_win_timer)
1905 user_handle_t win; /* window handle */
1906 unsigned int msg; /* message to post */
1907 unsigned int rate; /* timer rate in ms */
1908 unsigned long id; /* timer id */
1909 unsigned long lparam; /* message lparam (callback proc) */
1910 @REPLY
1911 unsigned long id; /* timer id */
1912 @END
1915 /* Kill a window timer */
1916 @REQ(kill_win_timer)
1917 user_handle_t win; /* window handle */
1918 unsigned int msg; /* message to post */
1919 unsigned long id; /* timer id */
1920 @END
1923 /* Retrieve info about a serial port */
1924 @REQ(get_serial_info)
1925 obj_handle_t handle; /* handle to comm port */
1926 @REPLY
1927 unsigned int readinterval;
1928 unsigned int readconst;
1929 unsigned int readmult;
1930 unsigned int writeconst;
1931 unsigned int writemult;
1932 unsigned int eventmask;
1933 @END
1936 /* Set info about a serial port */
1937 @REQ(set_serial_info)
1938 obj_handle_t handle; /* handle to comm port */
1939 int flags; /* bitmask to set values (see below) */
1940 unsigned int readinterval;
1941 unsigned int readconst;
1942 unsigned int readmult;
1943 unsigned int writeconst;
1944 unsigned int writemult;
1945 unsigned int eventmask;
1946 @END
1947 #define SERIALINFO_SET_TIMEOUTS 0x01
1948 #define SERIALINFO_SET_MASK 0x02
1951 /* Create an async I/O */
1952 @REQ(register_async)
1953 obj_handle_t handle; /* handle to comm port, socket or file */
1954 int type; /* type of queue to look after */
1955 int count; /* count - usually # of bytes to be read/written */
1956 async_data_t async; /* async I/O parameters */
1957 @END
1958 #define ASYNC_TYPE_READ 0x01
1959 #define ASYNC_TYPE_WRITE 0x02
1960 #define ASYNC_TYPE_WAIT 0x03
1963 /* Cancel all async op on a fd */
1964 @REQ(cancel_async)
1965 obj_handle_t handle; /* handle to comm port, socket or file */
1966 @END
1969 /* Perform an ioctl on a file */
1970 @REQ(ioctl)
1971 obj_handle_t handle; /* handle to the device */
1972 ioctl_code_t code; /* ioctl code */
1973 async_data_t async; /* async I/O parameters */
1974 VARARG(in_data,bytes); /* ioctl input data */
1975 @REPLY
1976 obj_handle_t wait; /* handle to wait on for blocking ioctl */
1977 unsigned int options; /* device open options */
1978 VARARG(out_data,bytes); /* ioctl output data */
1979 @END
1982 /* Retrieve results of an async ioctl */
1983 @REQ(get_ioctl_result)
1984 obj_handle_t handle; /* handle to the device */
1985 void* user_arg; /* user arg used to identify the request */
1986 @REPLY
1987 VARARG(out_data,bytes); /* ioctl output data */
1988 @END
1991 /* Create a named pipe */
1992 @REQ(create_named_pipe)
1993 unsigned int access;
1994 unsigned int attributes; /* object attributes */
1995 obj_handle_t rootdir; /* root directory */
1996 unsigned int options;
1997 unsigned int flags;
1998 unsigned int maxinstances;
1999 unsigned int outsize;
2000 unsigned int insize;
2001 timeout_t timeout;
2002 VARARG(name,unicode_str); /* pipe name */
2003 @REPLY
2004 obj_handle_t handle; /* handle to the pipe */
2005 @END
2007 /* flags in create_named_pipe and get_named_pipe_info */
2008 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2009 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2010 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2011 #define NAMED_PIPE_SERVER_END 0x8000
2014 @REQ(get_named_pipe_info)
2015 obj_handle_t handle;
2016 @REPLY
2017 unsigned int flags;
2018 unsigned int maxinstances;
2019 unsigned int instances;
2020 unsigned int outsize;
2021 unsigned int insize;
2022 @END
2025 /* Create a cursor */
2026 @REQ(create_cursor)
2027 unsigned int num_frames;
2028 unsigned short delay;
2029 @REPLY
2030 user_handle_t handle;
2031 @END
2034 /* Destroy a cursor */
2035 @REQ(destroy_cursor)
2036 user_handle_t handle;
2037 @END
2040 /* Get cursor info */
2041 @REQ(get_cursor_info)
2042 user_handle_t handle;
2043 @REPLY
2044 unsigned int num_frames;
2045 unsigned short delay;
2046 @END
2049 /* Get cursor frame */
2050 @REQ(get_cursor_frame)
2051 user_handle_t handle;
2052 unsigned int frame_idx;
2053 @REPLY
2054 unsigned short xhot;
2055 unsigned short yhot;
2056 unsigned short width;
2057 unsigned short height;
2058 unsigned short and_width_bytes;
2059 unsigned short xor_width_bytes;
2060 unsigned char planes;
2061 unsigned char bpp;
2062 VARARG(data,bytes);
2063 @END
2066 /* Set cursor frame */
2067 @REQ(set_cursor_frame)
2068 user_handle_t handle;
2069 unsigned int frame_idx;
2070 unsigned short xhot;
2071 unsigned short yhot;
2072 unsigned short width;
2073 unsigned short height;
2074 unsigned short and_width_bytes;
2075 unsigned short xor_width_bytes;
2076 unsigned char planes;
2077 unsigned char bpp;
2078 VARARG(data,bytes);
2079 @END
2082 /* Create a window */
2083 @REQ(create_window)
2084 user_handle_t parent; /* parent window */
2085 user_handle_t owner; /* owner window */
2086 atom_t atom; /* class atom */
2087 void* instance; /* module instance */
2088 @REPLY
2089 user_handle_t handle; /* created window */
2090 user_handle_t parent; /* full handle of parent */
2091 user_handle_t owner; /* full handle of owner */
2092 int extra; /* number of extra bytes */
2093 void* class_ptr; /* pointer to class in client address space */
2094 @END
2097 /* Destroy a window */
2098 @REQ(destroy_window)
2099 user_handle_t handle; /* handle to the window */
2100 @END
2103 /* Retrieve the desktop window for the current thread */
2104 @REQ(get_desktop_window)
2105 int force; /* force creation if it doesn't exist */
2106 @REPLY
2107 user_handle_t handle; /* handle to the desktop window */
2108 @END
2111 /* Set a window owner */
2112 @REQ(set_window_owner)
2113 user_handle_t handle; /* handle to the window */
2114 user_handle_t owner; /* new owner */
2115 @REPLY
2116 user_handle_t full_owner; /* full handle of new owner */
2117 user_handle_t prev_owner; /* full handle of previous owner */
2118 @END
2121 /* Get information from a window handle */
2122 @REQ(get_window_info)
2123 user_handle_t handle; /* handle to the window */
2124 @REPLY
2125 user_handle_t full_handle; /* full 32-bit handle */
2126 user_handle_t last_active; /* last active popup */
2127 process_id_t pid; /* process owning the window */
2128 thread_id_t tid; /* thread owning the window */
2129 atom_t atom; /* class atom */
2130 int is_unicode; /* ANSI or unicode */
2131 @END
2134 /* Set some information in a window */
2135 @REQ(set_window_info)
2136 unsigned int flags; /* flags for fields to set (see below) */
2137 user_handle_t handle; /* handle to the window */
2138 unsigned int style; /* window style */
2139 unsigned int ex_style; /* window extended style */
2140 unsigned int id; /* window id */
2141 int is_unicode; /* ANSI or unicode */
2142 void* instance; /* creator instance */
2143 unsigned long user_data; /* user-specific data */
2144 int extra_offset; /* offset to set in extra bytes */
2145 data_size_t extra_size; /* size to set in extra bytes */
2146 unsigned long extra_value; /* value to set in extra bytes */
2147 @REPLY
2148 unsigned int old_style; /* old window style */
2149 unsigned int old_ex_style; /* old window extended style */
2150 unsigned int old_id; /* old window id */
2151 void* old_instance; /* old creator instance */
2152 unsigned long old_user_data; /* old user-specific data */
2153 unsigned long old_extra_value; /* old value in extra bytes */
2154 @END
2155 #define SET_WIN_STYLE 0x01
2156 #define SET_WIN_EXSTYLE 0x02
2157 #define SET_WIN_ID 0x04
2158 #define SET_WIN_INSTANCE 0x08
2159 #define SET_WIN_USERDATA 0x10
2160 #define SET_WIN_EXTRA 0x20
2161 #define SET_WIN_UNICODE 0x40
2164 /* Set the parent of a window */
2165 @REQ(set_parent)
2166 user_handle_t handle; /* handle to the window */
2167 user_handle_t parent; /* handle to the parent */
2168 @REPLY
2169 user_handle_t old_parent; /* old parent window */
2170 user_handle_t full_parent; /* full handle of new parent */
2171 @END
2174 /* Get a list of the window parents, up to the root of the tree */
2175 @REQ(get_window_parents)
2176 user_handle_t handle; /* handle to the window */
2177 @REPLY
2178 int count; /* total count of parents */
2179 VARARG(parents,user_handles); /* parent handles */
2180 @END
2183 /* Get a list of the window children */
2184 @REQ(get_window_children)
2185 user_handle_t parent; /* parent window */
2186 atom_t atom; /* class atom for the listed children */
2187 thread_id_t tid; /* thread owning the listed children */
2188 @REPLY
2189 int count; /* total count of children */
2190 VARARG(children,user_handles); /* children handles */
2191 @END
2194 /* Get a list of the window children that contain a given point */
2195 @REQ(get_window_children_from_point)
2196 user_handle_t parent; /* parent window */
2197 int x; /* point in parent coordinates */
2198 int y;
2199 @REPLY
2200 int count; /* total count of children */
2201 VARARG(children,user_handles); /* children handles */
2202 @END
2205 /* Get window tree information from a window handle */
2206 @REQ(get_window_tree)
2207 user_handle_t handle; /* handle to the window */
2208 @REPLY
2209 user_handle_t parent; /* parent window */
2210 user_handle_t owner; /* owner window */
2211 user_handle_t next_sibling; /* next sibling in Z-order */
2212 user_handle_t prev_sibling; /* prev sibling in Z-order */
2213 user_handle_t first_sibling; /* first sibling in Z-order */
2214 user_handle_t last_sibling; /* last sibling in Z-order */
2215 user_handle_t first_child; /* first child */
2216 user_handle_t last_child; /* last child */
2217 @END
2219 /* Set the position and Z order of a window */
2220 @REQ(set_window_pos)
2221 unsigned int flags; /* SWP_* flags */
2222 user_handle_t handle; /* handle to the window */
2223 user_handle_t previous; /* previous window in Z order */
2224 rectangle_t window; /* window rectangle */
2225 rectangle_t client; /* client rectangle */
2226 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2227 @REPLY
2228 unsigned int new_style; /* new window style */
2229 @END
2232 /* Get the window and client rectangles of a window */
2233 @REQ(get_window_rectangles)
2234 user_handle_t handle; /* handle to the window */
2235 @REPLY
2236 rectangle_t window; /* window rectangle */
2237 rectangle_t visible; /* visible part of the window rectangle */
2238 rectangle_t client; /* client rectangle */
2239 @END
2242 /* Get the window text */
2243 @REQ(get_window_text)
2244 user_handle_t handle; /* handle to the window */
2245 @REPLY
2246 VARARG(text,unicode_str); /* window text */
2247 @END
2250 /* Set the window text */
2251 @REQ(set_window_text)
2252 user_handle_t handle; /* handle to the window */
2253 VARARG(text,unicode_str); /* window text */
2254 @END
2257 /* Get the coordinates offset between two windows */
2258 @REQ(get_windows_offset)
2259 user_handle_t from; /* handle to the first window */
2260 user_handle_t to; /* handle to the second window */
2261 @REPLY
2262 int x; /* x coordinate offset */
2263 int y; /* y coordinate offset */
2264 @END
2267 /* Get the visible region of a window */
2268 @REQ(get_visible_region)
2269 user_handle_t window; /* handle to the window */
2270 unsigned int flags; /* DCX flags */
2271 @REPLY
2272 user_handle_t top_win; /* top window to clip against */
2273 rectangle_t top_rect; /* top window visible rect with screen coords */
2274 rectangle_t win_rect; /* window rect in screen coords */
2275 data_size_t total_size; /* total size of the resulting region */
2276 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2277 @END
2280 /* Get the window region */
2281 @REQ(get_window_region)
2282 user_handle_t window; /* handle to the window */
2283 @REPLY
2284 data_size_t total_size; /* total size of the resulting region */
2285 VARARG(region,rectangles); /* list of rectangles for the region */
2286 @END
2289 /* Set the window region */
2290 @REQ(set_window_region)
2291 user_handle_t window; /* handle to the window */
2292 int redraw; /* redraw the window? */
2293 VARARG(region,rectangles); /* list of rectangles for the region */
2294 @END
2297 /* Get the window update region */
2298 @REQ(get_update_region)
2299 user_handle_t window; /* handle to the window */
2300 user_handle_t from_child; /* child to start searching from */
2301 unsigned int flags; /* update flags (see below) */
2302 @REPLY
2303 user_handle_t child; /* child to repaint (or window itself) */
2304 unsigned int flags; /* resulting update flags (see below) */
2305 data_size_t total_size; /* total size of the resulting region */
2306 VARARG(region,rectangles); /* list of rectangles for the region */
2307 @END
2308 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2309 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2310 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2311 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2312 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2313 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2314 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2315 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2318 /* Update the z order of a window so that a given rectangle is fully visible */
2319 @REQ(update_window_zorder)
2320 user_handle_t window; /* handle to the window */
2321 rectangle_t rect; /* rectangle that must be visible */
2322 @END
2325 /* Mark parts of a window as needing a redraw */
2326 @REQ(redraw_window)
2327 user_handle_t window; /* handle to the window */
2328 unsigned int flags; /* RDW_* flags */
2329 VARARG(region,rectangles); /* list of rectangles for the region */
2330 @END
2333 /* Set a window property */
2334 @REQ(set_window_property)
2335 user_handle_t window; /* handle to the window */
2336 atom_t atom; /* property atom (if no name specified) */
2337 obj_handle_t handle; /* handle to store */
2338 VARARG(name,unicode_str); /* property name */
2339 @END
2342 /* Remove a window property */
2343 @REQ(remove_window_property)
2344 user_handle_t window; /* handle to the window */
2345 atom_t atom; /* property atom (if no name specified) */
2346 VARARG(name,unicode_str); /* property name */
2347 @REPLY
2348 obj_handle_t handle; /* handle stored in property */
2349 @END
2352 /* Get a window property */
2353 @REQ(get_window_property)
2354 user_handle_t window; /* handle to the window */
2355 atom_t atom; /* property atom (if no name specified) */
2356 VARARG(name,unicode_str); /* property name */
2357 @REPLY
2358 obj_handle_t handle; /* handle stored in property */
2359 @END
2362 /* Get the list of properties of a window */
2363 @REQ(get_window_properties)
2364 user_handle_t window; /* handle to the window */
2365 @REPLY
2366 int total; /* total number of properties */
2367 VARARG(props,properties); /* list of properties */
2368 @END
2371 /* Create a window station */
2372 @REQ(create_winstation)
2373 unsigned int flags; /* window station flags */
2374 unsigned int access; /* wanted access rights */
2375 unsigned int attributes; /* object attributes */
2376 VARARG(name,unicode_str); /* object name */
2377 @REPLY
2378 obj_handle_t handle; /* handle to the window station */
2379 @END
2382 /* Open a handle to a window station */
2383 @REQ(open_winstation)
2384 unsigned int access; /* wanted access rights */
2385 unsigned int attributes; /* object attributes */
2386 VARARG(name,unicode_str); /* object name */
2387 @REPLY
2388 obj_handle_t handle; /* handle to the window station */
2389 @END
2392 /* Close a window station */
2393 @REQ(close_winstation)
2394 obj_handle_t handle; /* handle to the window station */
2395 @END
2398 /* Get the process current window station */
2399 @REQ(get_process_winstation)
2400 @REPLY
2401 obj_handle_t handle; /* handle to the window station */
2402 @END
2405 /* Set the process current window station */
2406 @REQ(set_process_winstation)
2407 obj_handle_t handle; /* handle to the window station */
2408 @END
2411 /* Create a desktop */
2412 @REQ(create_desktop)
2413 unsigned int flags; /* desktop flags */
2414 unsigned int access; /* wanted access rights */
2415 unsigned int attributes; /* object attributes */
2416 VARARG(name,unicode_str); /* object name */
2417 @REPLY
2418 obj_handle_t handle; /* handle to the desktop */
2419 @END
2422 /* Open a handle to a desktop */
2423 @REQ(open_desktop)
2424 unsigned int flags; /* desktop flags */
2425 unsigned int access; /* wanted access rights */
2426 unsigned int attributes; /* object attributes */
2427 VARARG(name,unicode_str); /* object name */
2428 @REPLY
2429 obj_handle_t handle; /* handle to the desktop */
2430 @END
2433 /* Close a desktop */
2434 @REQ(close_desktop)
2435 obj_handle_t handle; /* handle to the desktop */
2436 @END
2439 /* Get the thread current desktop */
2440 @REQ(get_thread_desktop)
2441 thread_id_t tid; /* thread id */
2442 @REPLY
2443 obj_handle_t handle; /* handle to the desktop */
2444 @END
2447 /* Set the thread current desktop */
2448 @REQ(set_thread_desktop)
2449 obj_handle_t handle; /* handle to the desktop */
2450 @END
2453 /* Get/set information about a user object (window station or desktop) */
2454 @REQ(set_user_object_info)
2455 obj_handle_t handle; /* handle to the object */
2456 unsigned int flags; /* information to set */
2457 unsigned int obj_flags; /* new object flags */
2458 @REPLY
2459 int is_desktop; /* is object a desktop? */
2460 unsigned int old_obj_flags; /* old object flags */
2461 VARARG(name,unicode_str); /* object name */
2462 @END
2463 #define SET_USER_OBJECT_FLAGS 1
2466 /* Attach (or detach) thread inputs */
2467 @REQ(attach_thread_input)
2468 thread_id_t tid_from; /* thread to be attached */
2469 thread_id_t tid_to; /* thread to which tid_from should be attached */
2470 int attach; /* is it an attach? */
2471 @END
2474 /* Get input data for a given thread */
2475 @REQ(get_thread_input)
2476 thread_id_t tid; /* id of thread */
2477 @REPLY
2478 user_handle_t focus; /* handle to the focus window */
2479 user_handle_t capture; /* handle to the capture window */
2480 user_handle_t active; /* handle to the active window */
2481 user_handle_t foreground; /* handle to the global foreground window */
2482 user_handle_t menu_owner; /* handle to the menu owner */
2483 user_handle_t move_size; /* handle to the moving/resizing window */
2484 user_handle_t caret; /* handle to the caret window */
2485 rectangle_t rect; /* caret rectangle */
2486 @END
2489 /* Get the time of the last input event */
2490 @REQ(get_last_input_time)
2491 @REPLY
2492 unsigned int time;
2493 @END
2496 /* Retrieve queue keyboard state for a given thread */
2497 @REQ(get_key_state)
2498 thread_id_t tid; /* id of thread */
2499 int key; /* optional key code or -1 */
2500 @REPLY
2501 unsigned char state; /* state of specified key */
2502 VARARG(keystate,bytes); /* state array for all the keys */
2503 @END
2505 /* Set queue keyboard state for a given thread */
2506 @REQ(set_key_state)
2507 thread_id_t tid; /* id of thread */
2508 VARARG(keystate,bytes); /* state array for all the keys */
2509 @END
2511 /* Set the system foreground window */
2512 @REQ(set_foreground_window)
2513 user_handle_t handle; /* handle to the foreground window */
2514 @REPLY
2515 user_handle_t previous; /* handle to the previous foreground window */
2516 int send_msg_old; /* whether we have to send a msg to the old window */
2517 int send_msg_new; /* whether we have to send a msg to the new window */
2518 @END
2520 /* Set the current thread focus window */
2521 @REQ(set_focus_window)
2522 user_handle_t handle; /* handle to the focus window */
2523 @REPLY
2524 user_handle_t previous; /* handle to the previous focus window */
2525 @END
2527 /* Set the current thread active window */
2528 @REQ(set_active_window)
2529 user_handle_t handle; /* handle to the active window */
2530 @REPLY
2531 user_handle_t previous; /* handle to the previous active window */
2532 @END
2534 /* Set the current thread capture window */
2535 @REQ(set_capture_window)
2536 user_handle_t handle; /* handle to the capture window */
2537 unsigned int flags; /* capture flags (see below) */
2538 @REPLY
2539 user_handle_t previous; /* handle to the previous capture window */
2540 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2541 @END
2542 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2543 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2546 /* Set the current thread caret window */
2547 @REQ(set_caret_window)
2548 user_handle_t handle; /* handle to the caret window */
2549 int width; /* caret width */
2550 int height; /* caret height */
2551 @REPLY
2552 user_handle_t previous; /* handle to the previous caret window */
2553 rectangle_t old_rect; /* previous caret rectangle */
2554 int old_hide; /* previous hide count */
2555 int old_state; /* previous caret state (1=on, 0=off) */
2556 @END
2559 /* Set the current thread caret information */
2560 @REQ(set_caret_info)
2561 unsigned int flags; /* caret flags (see below) */
2562 user_handle_t handle; /* handle to the caret window */
2563 int x; /* caret x position */
2564 int y; /* caret y position */
2565 int hide; /* increment for hide count (can be negative to show it) */
2566 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2567 @REPLY
2568 user_handle_t full_handle; /* handle to the current caret window */
2569 rectangle_t old_rect; /* previous caret rectangle */
2570 int old_hide; /* previous hide count */
2571 int old_state; /* previous caret state (1=on, 0=off) */
2572 @END
2573 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2574 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2575 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2578 /* Set a window hook */
2579 @REQ(set_hook)
2580 int id; /* id of the hook */
2581 process_id_t pid; /* id of process to set the hook into */
2582 thread_id_t tid; /* id of thread to set the hook into */
2583 int event_min;
2584 int event_max;
2585 int flags;
2586 void* proc; /* hook procedure */
2587 int unicode; /* is it a unicode hook? */
2588 VARARG(module,unicode_str); /* module name */
2589 @REPLY
2590 user_handle_t handle; /* handle to the hook */
2591 unsigned int active_hooks; /* active hooks bitmap */
2592 @END
2595 /* Remove a window hook */
2596 @REQ(remove_hook)
2597 user_handle_t handle; /* handle to the hook */
2598 int id; /* id of the hook if handle is 0 */
2599 void* proc; /* hook procedure if handle is 0 */
2600 @REPLY
2601 unsigned int active_hooks; /* active hooks bitmap */
2602 @END
2605 /* Start calling a hook chain */
2606 @REQ(start_hook_chain)
2607 int id; /* id of the hook */
2608 int event; /* signalled event */
2609 user_handle_t window; /* handle to the event window */
2610 int object_id; /* object id for out of context winevent */
2611 int child_id; /* child id for out of context winevent */
2612 @REPLY
2613 user_handle_t handle; /* handle to the next hook */
2614 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2615 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2616 void* proc; /* hook procedure */
2617 int unicode; /* is it a unicode hook? */
2618 unsigned int active_hooks; /* active hooks bitmap */
2619 VARARG(module,unicode_str); /* module name */
2620 @END
2623 /* Finished calling a hook chain */
2624 @REQ(finish_hook_chain)
2625 int id; /* id of the hook */
2626 @END
2629 /* Get the hook information */
2630 @REQ(get_hook_info)
2631 user_handle_t handle; /* handle to the current hook */
2632 int get_next; /* do we want info about current or next hook? */
2633 int event; /* signalled event */
2634 user_handle_t window; /* handle to the event window */
2635 int object_id; /* object id for out of context winevent */
2636 int child_id; /* child id for out of context winevent */
2637 @REPLY
2638 user_handle_t handle; /* handle to the hook */
2639 int id; /* id of the hook */
2640 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2641 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2642 void* proc; /* hook procedure */
2643 int unicode; /* is it a unicode hook? */
2644 VARARG(module,unicode_str); /* module name */
2645 @END
2648 /* Create a window class */
2649 @REQ(create_class)
2650 int local; /* is it a local class? */
2651 atom_t atom; /* class atom */
2652 unsigned int style; /* class style */
2653 void* instance; /* module instance */
2654 int extra; /* number of extra class bytes */
2655 int win_extra; /* number of window extra bytes */
2656 void* client_ptr; /* pointer to class in client address space */
2657 @END
2660 /* Destroy a window class */
2661 @REQ(destroy_class)
2662 atom_t atom; /* class atom */
2663 void* instance; /* module instance */
2664 @REPLY
2665 void* client_ptr; /* pointer to class in client address space */
2666 @END
2669 /* Set some information in a class */
2670 @REQ(set_class_info)
2671 user_handle_t window; /* handle to the window */
2672 unsigned int flags; /* flags for info to set (see below) */
2673 atom_t atom; /* class atom */
2674 unsigned int style; /* class style */
2675 int win_extra; /* number of window extra bytes */
2676 void* instance; /* module instance */
2677 int extra_offset; /* offset to set in extra bytes */
2678 data_size_t extra_size; /* size to set in extra bytes */
2679 unsigned long extra_value; /* value to set in extra bytes */
2680 @REPLY
2681 atom_t old_atom; /* previous class atom */
2682 unsigned int old_style; /* previous class style */
2683 int old_extra; /* previous number of class extra bytes */
2684 int old_win_extra; /* previous number of window extra bytes */
2685 void* old_instance; /* previous module instance */
2686 unsigned long old_extra_value; /* old value in extra bytes */
2687 @END
2688 #define SET_CLASS_ATOM 0x0001
2689 #define SET_CLASS_STYLE 0x0002
2690 #define SET_CLASS_WINEXTRA 0x0004
2691 #define SET_CLASS_INSTANCE 0x0008
2692 #define SET_CLASS_EXTRA 0x0010
2695 /* Set/get clipboard information */
2696 @REQ(set_clipboard_info)
2697 unsigned int flags; /* flags for fields to set (see below) */
2698 user_handle_t clipboard; /* clipboard window */
2699 user_handle_t owner; /* clipboard owner */
2700 user_handle_t viewer; /* first clipboard viewer */
2701 unsigned int seqno; /* change sequence number */
2702 @REPLY
2703 unsigned int flags; /* status flags (see below) */
2704 user_handle_t old_clipboard; /* old clipboard window */
2705 user_handle_t old_owner; /* old clipboard owner */
2706 user_handle_t old_viewer; /* old clipboard viewer */
2707 unsigned int seqno; /* current sequence number */
2708 @END
2710 #define SET_CB_OPEN 0x001
2711 #define SET_CB_OWNER 0x002
2712 #define SET_CB_VIEWER 0x004
2713 #define SET_CB_SEQNO 0x008
2714 #define SET_CB_RELOWNER 0x010
2715 #define SET_CB_CLOSE 0x020
2716 #define CB_OPEN 0x040
2717 #define CB_OWNER 0x080
2718 #define CB_PROCESS 0x100
2721 /* Open a security token */
2722 @REQ(open_token)
2723 obj_handle_t handle; /* handle to the thread or process */
2724 unsigned int access; /* access rights to the new token */
2725 unsigned int attributes;/* object attributes */
2726 unsigned int flags; /* flags (see below) */
2727 @REPLY
2728 obj_handle_t token; /* handle to the token */
2729 @END
2730 #define OPEN_TOKEN_THREAD 1
2731 #define OPEN_TOKEN_AS_SELF 2
2734 /* Set/get the global windows */
2735 @REQ(set_global_windows)
2736 unsigned int flags; /* flags for fields to set (see below) */
2737 user_handle_t shell_window; /* handle to the new shell window */
2738 user_handle_t shell_listview; /* handle to the new shell listview window */
2739 user_handle_t progman_window; /* handle to the new program manager window */
2740 user_handle_t taskman_window; /* handle to the new task manager window */
2741 @REPLY
2742 user_handle_t old_shell_window; /* handle to the shell window */
2743 user_handle_t old_shell_listview; /* handle to the shell listview window */
2744 user_handle_t old_progman_window; /* handle to the new program manager window */
2745 user_handle_t old_taskman_window; /* handle to the new task manager window */
2746 @END
2747 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2748 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2749 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2751 /* Adjust the privileges held by a token */
2752 @REQ(adjust_token_privileges)
2753 obj_handle_t handle; /* handle to the token */
2754 int disable_all; /* disable all privileges? */
2755 int get_modified_state; /* get modified privileges? */
2756 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2757 @REPLY
2758 unsigned int len; /* total length in bytes required to store token privileges */
2759 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2760 @END
2762 /* Retrieves the set of privileges held by or available to a token */
2763 @REQ(get_token_privileges)
2764 obj_handle_t handle; /* handle to the token */
2765 @REPLY
2766 unsigned int len; /* total length in bytes required to store token privileges */
2767 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2768 @END
2770 /* Check the token has the required privileges */
2771 @REQ(check_token_privileges)
2772 obj_handle_t handle; /* handle to the token */
2773 int all_required; /* are all the privileges required for the check to succeed? */
2774 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2775 @REPLY
2776 int has_privileges; /* does the token have the required privileges? */
2777 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2778 @END
2780 @REQ(duplicate_token)
2781 obj_handle_t handle; /* handle to the token to duplicate */
2782 unsigned int access; /* access rights to the new token */
2783 unsigned int attributes; /* object attributes */
2784 int primary; /* is the new token to be a primary one? */
2785 int impersonation_level; /* impersonation level of the new token */
2786 @REPLY
2787 obj_handle_t new_handle; /* duplicated handle */
2788 @END
2790 @REQ(access_check)
2791 obj_handle_t handle; /* handle to the token */
2792 unsigned int desired_access; /* desired access to the object */
2793 unsigned int mapping_read; /* mapping from generic read to specific rights */
2794 unsigned int mapping_write; /* mapping from generic write to specific rights */
2795 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2796 unsigned int mapping_all; /* mapping from generic all to specific rights */
2797 VARARG(sd,security_descriptor); /* security descriptor to check */
2798 @REPLY
2799 unsigned int access_granted; /* access rights actually granted */
2800 unsigned int access_status; /* was access granted? */
2801 unsigned int privileges_len; /* length needed to store privileges */
2802 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2803 @END
2805 @REQ(get_token_user)
2806 obj_handle_t handle; /* handle to the token */
2807 @REPLY
2808 data_size_t user_len; /* length needed to store user */
2809 VARARG(user,SID); /* sid of the user the token represents */
2810 @END
2812 @REQ(get_token_groups)
2813 obj_handle_t handle; /* handle to the token */
2814 @REPLY
2815 data_size_t user_len; /* length needed to store user */
2816 VARARG(user,token_groups); /* groups the token's user belongs to */
2817 @END
2819 @REQ(set_security_object)
2820 obj_handle_t handle; /* handle to the object */
2821 unsigned int security_info; /* which parts of security descriptor to set */
2822 VARARG(sd,security_descriptor); /* security descriptor to set */
2823 @END
2825 @REQ(get_security_object)
2826 obj_handle_t handle; /* handle to the object */
2827 unsigned int security_info; /* which parts of security descriptor to get */
2828 @REPLY
2829 unsigned int sd_len; /* buffer size needed for sd */
2830 VARARG(sd,security_descriptor); /* retrieved security descriptor */
2831 @END
2833 /* Create a mailslot */
2834 @REQ(create_mailslot)
2835 unsigned int access; /* wanted access rights */
2836 unsigned int attributes; /* object attributes */
2837 obj_handle_t rootdir; /* root directory */
2838 unsigned int max_msgsize;
2839 timeout_t read_timeout;
2840 VARARG(name,unicode_str); /* mailslot name */
2841 @REPLY
2842 obj_handle_t handle; /* handle to the mailslot */
2843 @END
2846 /* Set mailslot information */
2847 @REQ(set_mailslot_info)
2848 obj_handle_t handle; /* handle to the mailslot */
2849 unsigned int flags;
2850 timeout_t read_timeout;
2851 @REPLY
2852 unsigned int max_msgsize;
2853 timeout_t read_timeout;
2854 @END
2855 #define MAILSLOT_SET_READ_TIMEOUT 1
2858 /* Create a directory object */
2859 @REQ(create_directory)
2860 unsigned int access; /* access flags */
2861 unsigned int attributes; /* object attributes */
2862 obj_handle_t rootdir; /* root directory */
2863 VARARG(directory_name,unicode_str); /* Directory name */
2864 @REPLY
2865 obj_handle_t handle; /* handle to the directory */
2866 @END
2869 /* Open a directory object */
2870 @REQ(open_directory)
2871 unsigned int access; /* access flags */
2872 unsigned int attributes; /* object attributes */
2873 obj_handle_t rootdir; /* root directory */
2874 VARARG(directory_name,unicode_str); /* Directory name */
2875 @REPLY
2876 obj_handle_t handle; /* handle to the directory */
2877 @END
2880 /* Create a symbolic link object */
2881 @REQ(create_symlink)
2882 unsigned int access; /* access flags */
2883 unsigned int attributes; /* object attributes */
2884 obj_handle_t rootdir; /* root directory */
2885 data_size_t name_len; /* length of the symlink name in bytes */
2886 VARARG(name,unicode_str,name_len); /* symlink name */
2887 VARARG(target_name,unicode_str); /* target name */
2888 @REPLY
2889 obj_handle_t handle; /* handle to the symlink */
2890 @END
2893 /* Open a symbolic link object */
2894 @REQ(open_symlink)
2895 unsigned int access; /* access flags */
2896 unsigned int attributes; /* object attributes */
2897 obj_handle_t rootdir; /* root directory */
2898 VARARG(name,unicode_str); /* symlink name */
2899 @REPLY
2900 obj_handle_t handle; /* handle to the symlink */
2901 @END
2904 /* Query a symbolic link object */
2905 @REQ(query_symlink)
2906 obj_handle_t handle; /* handle to the symlink */
2907 @REPLY
2908 VARARG(target_name,unicode_str); /* target name */
2909 @END
2912 /* Query basic object information */
2913 @REQ(get_object_info)
2914 obj_handle_t handle; /* handle to the object */
2915 @REPLY
2916 unsigned int access; /* granted access mask */
2917 unsigned int ref_count; /* object ref count */
2918 @END
2920 /* Query the impersonation level of an impersonation token */
2921 @REQ(get_token_impersonation_level)
2922 obj_handle_t handle; /* handle to the object */
2923 @REPLY
2924 int impersonation_level; /* impersonation level of the impersonation token */
2925 @END
2927 /* Allocate a locally-unique identifier */
2928 @REQ(allocate_locally_unique_id)
2929 @REPLY
2930 luid_t luid;
2931 @END
2934 /* Create a device manager */
2935 @REQ(create_device_manager)
2936 unsigned int access; /* wanted access rights */
2937 unsigned int attributes; /* object attributes */
2938 @REPLY
2939 obj_handle_t handle; /* handle to the device */
2940 @END
2943 /* Create a device */
2944 @REQ(create_device)
2945 unsigned int access; /* wanted access rights */
2946 unsigned int attributes; /* object attributes */
2947 obj_handle_t rootdir; /* root directory */
2948 obj_handle_t manager; /* device manager */
2949 void* user_ptr; /* opaque ptr for use by client */
2950 VARARG(name,unicode_str); /* object name */
2951 @REPLY
2952 obj_handle_t handle; /* handle to the device */
2953 @END
2956 /* Delete a device */
2957 @REQ(delete_device)
2958 obj_handle_t handle; /* handle to the device */
2959 @END
2962 /* Retrieve the next pending device ioctl request */
2963 @REQ(get_next_device_request)
2964 obj_handle_t manager; /* handle to the device manager */
2965 obj_handle_t prev; /* handle to the previous ioctl */
2966 unsigned int status; /* status of the previous ioctl */
2967 VARARG(prev_data,bytes); /* output data of the previous ioctl */
2968 @REPLY
2969 obj_handle_t next; /* handle to the next ioctl */
2970 ioctl_code_t code; /* ioctl code */
2971 void* user_ptr; /* opaque ptr for the device */
2972 data_size_t in_size; /* total needed input size */
2973 data_size_t out_size; /* needed output size */
2974 VARARG(next_data,bytes); /* input data of the next ioctl */
2975 @END
2978 /* Make the current process a system process */
2979 @REQ(make_process_system)
2980 @REPLY
2981 obj_handle_t event; /* event signaled when all user processes have exited */
2982 @END
2985 /* Get detailed fixed-size information about a token */
2986 @REQ(get_token_statistics)
2987 obj_handle_t handle; /* handle to the object */
2988 @REPLY
2989 luid_t token_id; /* locally-unique identifier of the token */
2990 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
2991 int primary; /* is the token primary or impersonation? */
2992 int impersonation_level; /* level of impersonation */
2993 int group_count; /* the number of groups the token is a member of */
2994 int privilege_count; /* the number of privileges the token has */
2995 @END
2998 /* Create I/O completion port */
2999 @REQ(create_completion)
3000 unsigned int access; /* desired access to a port */
3001 unsigned int attributes; /* object attributes */
3002 unsigned int concurrent; /* max number of concurrent active threads */
3003 obj_handle_t rootdir; /* root directory */
3004 VARARG(filename,string); /* port name */
3005 @REPLY
3006 obj_handle_t handle; /* port handle */
3007 @END
3010 /* Open I/O completion port */
3011 @REQ(open_completion)
3012 unsigned int access; /* desired access to a port */
3013 unsigned int attributes; /* object attributes */
3014 obj_handle_t rootdir; /* root directory */
3015 VARARG(filename,string); /* port name */
3016 @REPLY
3017 obj_handle_t handle; /* port handle */
3018 @END
3021 /* add completion to completion port */
3022 @REQ(add_completion)
3023 obj_handle_t handle; /* port handle */
3024 unsigned long ckey; /* completion key */
3025 unsigned long cvalue; /* completion value */
3026 unsigned long information; /* IO_STATUS_BLOCK Information */
3027 unsigned int status; /* completion result */
3028 @END
3031 /* get completion from completion port queue */
3032 @REQ(remove_completion)
3033 obj_handle_t handle; /* port handle */
3034 @REPLY
3035 unsigned long ckey; /* completion key */
3036 unsigned long cvalue; /* completion value */
3037 unsigned long information; /* IO_STATUS_BLOCK Information */
3038 unsigned int status; /* completion result */
3039 @END
3042 /* get completion queue depth */
3043 @REQ(query_completion)
3044 obj_handle_t handle; /* port handle */
3045 @REPLY
3046 unsigned int depth; /* completion queue depth */
3047 @END
3050 /* associate object with completion port */
3051 @REQ(set_completion_info)
3052 obj_handle_t handle; /* object handle */
3053 obj_handle_t chandle; /* port handle */
3054 unsigned long ckey; /* completion key */
3055 @END