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