user32: Fix compiler warning
[wine/wine64.git] / server / protocol.def
blobbcac6267f5f4a25a59ac865abc1badfaceddef1f
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef unsigned int obj_handle_t;
35 typedef unsigned int user_handle_t;
36 typedef unsigned short atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
41 typedef unsigned __int64 lparam_t;
42 typedef unsigned __int64 apc_param_t;
43 typedef unsigned __int64 mem_size_t;
44 typedef unsigned __int64 file_pos_t;
46 struct request_header
48 int req; /* request code */
49 data_size_t request_size; /* request variable part size */
50 data_size_t reply_size; /* reply variable part maximum size */
53 struct reply_header
55 unsigned int error; /* error result */
56 data_size_t reply_size; /* reply variable part size */
59 /* placeholder structure for the maximum allowed request size */
60 /* this is used to construct the generic_request union */
61 struct request_max_size
63 /* For 64-bits future support,
64 * the structure is larger than it needs to be
65 * 3 int's are used by the header, so with this change, you can arguably
66 * put in the arguments in any way you like
68 long pad1[12];
69 int pad2[4];
72 #define REQ_SIZE_64 (sizeof(__int64) * 12 + sizeof(int) * 4)
73 #define REQ_SIZE_32 (sizeof(int) * 16)
75 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
76 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
79 /* definitions of the event data depending on the event code */
80 struct debug_event_exception
82 EXCEPTION_RECORD record; /* exception record */
83 int first; /* first chance exception? */
85 struct debug_event_create_thread
87 obj_handle_t handle; /* handle to the new thread */
88 void *teb; /* thread teb (in debugged process address space) */
89 void *start; /* thread startup routine */
91 struct debug_event_create_process
93 obj_handle_t file; /* handle to the process exe file */
94 obj_handle_t process; /* handle to the new process */
95 obj_handle_t thread; /* handle to the new thread */
96 void *base; /* base of executable image */
97 int dbg_offset; /* offset of debug info in file */
98 int dbg_size; /* size of debug info */
99 void *teb; /* thread teb (in debugged process address space) */
100 void *start; /* thread startup routine */
101 void *name; /* image name (optional) */
102 int unicode; /* is it Unicode? */
104 struct debug_event_exit
106 int exit_code; /* thread or process exit code */
108 struct debug_event_load_dll
110 obj_handle_t handle; /* file handle for the dll */
111 void *base; /* base address of the dll */
112 int dbg_offset; /* offset of debug info in file */
113 int dbg_size; /* size of debug info */
114 void *name; /* image name (optional) */
115 int unicode; /* is it Unicode? */
117 struct debug_event_unload_dll
119 void *base; /* base address of the dll */
121 struct debug_event_output_string
123 void *string; /* string to display (in debugged process address space) */
124 int unicode; /* is it Unicode? */
125 int length; /* string length */
127 struct debug_event_rip_info
129 int error; /* ??? */
130 int type; /* ??? */
132 union debug_event_data
134 struct debug_event_exception exception;
135 struct debug_event_create_thread create_thread;
136 struct debug_event_create_process create_process;
137 struct debug_event_exit exit;
138 struct debug_event_load_dll load_dll;
139 struct debug_event_unload_dll unload_dll;
140 struct debug_event_output_string output_string;
141 struct debug_event_rip_info rip_info;
144 /* debug event data */
145 typedef struct
147 int code; /* event code */
148 union debug_event_data info; /* event information */
149 } debug_event_t;
151 /* structure used in sending an fd from client to server */
152 struct send_fd
154 thread_id_t tid; /* thread id */
155 int fd; /* file descriptor on client-side */
158 /* structure sent by the server on the wait fifo */
159 struct wake_up_reply
161 void *cookie; /* magic cookie that was passed in select_request */
162 int signaled; /* wait result */
165 /* NT-style timeout, in 100ns units, negative means relative timeout */
166 typedef __int64 timeout_t;
167 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
169 /* structure returned in the list of window properties */
170 typedef struct
172 atom_t atom; /* property atom */
173 short string; /* was atom a string originally? */
174 lparam_t data; /* data stored in property */
175 } property_data_t;
177 /* structure to specify window rectangles */
178 typedef struct
180 int left;
181 int top;
182 int right;
183 int bottom;
184 } rectangle_t;
186 /* structure for parameters of async I/O calls */
187 typedef struct
189 obj_handle_t handle; /* object to perform I/O on */
190 obj_handle_t event; /* event to signal when done */
191 void *callback; /* client-side callback to call upon end of async */
192 void *iosb; /* I/O status block in client addr space */
193 void *arg; /* opaque user data to pass to callback */
194 void *apc; /* user apc to call */
195 apc_param_t cvalue; /* completion value to use for completion events */
196 } async_data_t;
198 /* structures for extra message data */
200 struct hardware_msg_data
202 lparam_t info; /* extra info */
203 int x; /* x position */
204 int y; /* y position */
205 unsigned int hw_id; /* unique id */
208 struct callback_msg_data
210 void *callback; /* callback function */
211 lparam_t data; /* user data for callback */
212 lparam_t result; /* message result */
215 struct winevent_msg_data
217 user_handle_t hook; /* hook handle */
218 thread_id_t tid; /* thread id */
219 void *hook_proc; /* hook proc address */
220 /* followed by module name if any */
223 typedef union
225 unsigned char bytes[1]; /* raw data for sent messages */
226 struct callback_msg_data callback;
227 struct winevent_msg_data winevent;
228 } message_data_t;
230 /* structure for console char/attribute info */
231 typedef struct
233 WCHAR ch;
234 unsigned short attr;
235 } char_info_t;
237 typedef struct
239 unsigned int low_part;
240 int high_part;
241 } luid_t;
243 #define MAX_ACL_LEN 65535
245 struct security_descriptor
247 unsigned int control; /* SE_ flags */
248 data_size_t owner_len;
249 data_size_t group_len;
250 data_size_t sacl_len;
251 data_size_t dacl_len;
252 /* VARARG(owner,SID); */
253 /* VARARG(group,SID); */
254 /* VARARG(sacl,ACL); */
255 /* VARARG(dacl,ACL); */
258 struct object_attributes
260 obj_handle_t rootdir; /* root directory */
261 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
262 data_size_t name_len; /* length of the name string. may be 0 */
263 /* VARARG(sd,security_descriptor); */
264 /* VARARG(name,unicode_str); */
267 struct token_groups
269 unsigned int count;
270 /* unsigned int attributes[count]; */
271 /* VARARG(sids,SID); */
274 enum apc_type
276 APC_NONE,
277 APC_USER,
278 APC_TIMER,
279 APC_ASYNC_IO,
280 APC_VIRTUAL_ALLOC,
281 APC_VIRTUAL_FREE,
282 APC_VIRTUAL_QUERY,
283 APC_VIRTUAL_PROTECT,
284 APC_VIRTUAL_FLUSH,
285 APC_VIRTUAL_LOCK,
286 APC_VIRTUAL_UNLOCK,
287 APC_MAP_VIEW,
288 APC_UNMAP_VIEW,
289 APC_CREATE_THREAD
292 typedef union
294 enum apc_type type;
295 struct
297 enum apc_type type; /* APC_USER */
298 void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
299 apc_param_t args[3]; /* arguments for user function */
300 } user;
301 struct
303 enum apc_type type; /* APC_TIMER */
304 void (__stdcall *func)(void*, unsigned int, unsigned int);
305 timeout_t time; /* absolute time of expiration */
306 void *arg; /* user argument */
307 } timer;
308 struct
310 enum apc_type type; /* APC_ASYNC_IO */
311 unsigned int (*func)(void*, void*, unsigned int, unsigned int *);
312 void *user; /* user pointer */
313 void *sb; /* status block */
314 unsigned int status; /* I/O status */
315 } async_io;
316 struct
318 enum apc_type type; /* APC_VIRTUAL_ALLOC */
319 void *addr; /* requested address */
320 mem_size_t size; /* allocation size */
321 unsigned int zero_bits; /* allocation alignment */
322 unsigned int op_type; /* type of operation */
323 unsigned int prot; /* memory protection flags */
324 } virtual_alloc;
325 struct
327 enum apc_type type; /* APC_VIRTUAL_FREE */
328 void *addr; /* requested address */
329 mem_size_t size; /* allocation size */
330 unsigned int op_type; /* type of operation */
331 } virtual_free;
332 struct
334 enum apc_type type; /* APC_VIRTUAL_QUERY */
335 const void *addr; /* requested address */
336 } virtual_query;
337 struct
339 enum apc_type type; /* APC_VIRTUAL_PROTECT */
340 void *addr; /* requested address */
341 mem_size_t size; /* requested size */
342 unsigned int prot; /* new protection flags */
343 } virtual_protect;
344 struct
346 enum apc_type type; /* APC_VIRTUAL_FLUSH */
347 const void *addr; /* requested address */
348 mem_size_t size; /* requested size */
349 } virtual_flush;
350 struct
352 enum apc_type type; /* APC_VIRTUAL_LOCK */
353 void *addr; /* requested address */
354 mem_size_t size; /* requested size */
355 } virtual_lock;
356 struct
358 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
359 void *addr; /* requested address */
360 mem_size_t size; /* requested size */
361 } virtual_unlock;
362 struct
364 enum apc_type type; /* APC_MAP_VIEW */
365 obj_handle_t handle; /* mapping handle */
366 void *addr; /* requested address */
367 mem_size_t size; /* allocation size */
368 file_pos_t offset; /* file offset */
369 unsigned int zero_bits; /* allocation alignment */
370 unsigned int alloc_type;/* allocation type */
371 unsigned int prot; /* memory protection flags */
372 } map_view;
373 struct
375 enum apc_type type; /* APC_UNMAP_VIEW */
376 void *addr; /* view address */
377 } unmap_view;
378 struct
380 enum apc_type type; /* APC_CREATE_THREAD */
381 void (__stdcall *func)(void*); /* start function */
382 void *arg; /* argument for start function */
383 mem_size_t reserve; /* reserve size for thread stack */
384 mem_size_t commit; /* commit size for thread stack */
385 int suspend; /* suspended thread? */
386 } create_thread;
387 } apc_call_t;
389 typedef union
391 enum apc_type type;
392 struct
394 enum apc_type type; /* APC_ASYNC_IO */
395 unsigned int status; /* new status of async operation */
396 unsigned int total; /* bytes transferred */
397 } async_io;
398 struct
400 enum apc_type type; /* APC_VIRTUAL_ALLOC */
401 unsigned int status; /* status returned by call */
402 void *addr; /* resulting address */
403 mem_size_t size; /* resulting size */
404 } virtual_alloc;
405 struct
407 enum apc_type type; /* APC_VIRTUAL_FREE */
408 unsigned int status; /* status returned by call */
409 void *addr; /* resulting address */
410 mem_size_t size; /* resulting size */
411 } virtual_free;
412 struct
414 enum apc_type type; /* APC_VIRTUAL_QUERY */
415 unsigned int status; /* status returned by call */
416 void *base; /* resulting base address */
417 void *alloc_base;/* resulting allocation base */
418 mem_size_t size; /* resulting region size */
419 unsigned int state; /* resulting region state */
420 unsigned int prot; /* resulting region protection */
421 unsigned int alloc_prot;/* resulting allocation protection */
422 unsigned int alloc_type;/* resulting region allocation type */
423 } virtual_query;
424 struct
426 enum apc_type type; /* APC_VIRTUAL_PROTECT */
427 unsigned int status; /* status returned by call */
428 void *addr; /* resulting address */
429 mem_size_t size; /* resulting size */
430 unsigned int prot; /* old protection flags */
431 } virtual_protect;
432 struct
434 enum apc_type type; /* APC_VIRTUAL_FLUSH */
435 unsigned int status; /* status returned by call */
436 const void *addr; /* resulting address */
437 mem_size_t size; /* resulting size */
438 } virtual_flush;
439 struct
441 enum apc_type type; /* APC_VIRTUAL_LOCK */
442 unsigned int status; /* status returned by call */
443 void *addr; /* resulting address */
444 mem_size_t size; /* resulting size */
445 } virtual_lock;
446 struct
448 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
449 unsigned int status; /* status returned by call */
450 void *addr; /* resulting address */
451 mem_size_t size; /* resulting size */
452 } virtual_unlock;
453 struct
455 enum apc_type type; /* APC_MAP_VIEW */
456 unsigned int status; /* status returned by call */
457 void *addr; /* resulting address */
458 mem_size_t size; /* resulting size */
459 } map_view;
460 struct
462 enum apc_type type; /* APC_MAP_VIEW */
463 unsigned int status; /* status returned by call */
464 } unmap_view;
465 struct
467 enum apc_type type; /* APC_CREATE_THREAD */
468 unsigned int status; /* status returned by call */
469 thread_id_t tid; /* thread id */
470 obj_handle_t handle; /* handle to new thread */
471 } create_thread;
472 } apc_result_t;
474 /****************************************************************/
475 /* Request declarations */
477 /* Create a new process from the context of the parent */
478 @REQ(new_process)
479 int inherit_all; /* inherit all handles from parent */
480 unsigned int create_flags; /* creation flags */
481 int socket_fd; /* file descriptor for process socket */
482 obj_handle_t exe_file; /* file handle for main exe */
483 obj_handle_t hstdin; /* handle for stdin */
484 obj_handle_t hstdout; /* handle for stdout */
485 obj_handle_t hstderr; /* handle for stderr */
486 unsigned int process_access; /* access rights for process object */
487 unsigned int process_attr; /* attributes for process object */
488 unsigned int thread_access; /* access rights for thread object */
489 unsigned int thread_attr; /* attributes for thread object */
490 VARARG(info,startup_info); /* startup information */
491 VARARG(env,unicode_str); /* environment for new process */
492 @REPLY
493 obj_handle_t info; /* new process info handle */
494 process_id_t pid; /* process id */
495 obj_handle_t phandle; /* process handle (in the current process) */
496 thread_id_t tid; /* thread id */
497 obj_handle_t thandle; /* thread handle (in the current process) */
498 @END
501 /* Retrieve information about a newly started process */
502 @REQ(get_new_process_info)
503 obj_handle_t info; /* info handle returned from new_process_request */
504 @REPLY
505 int success; /* did the process start successfully? */
506 int exit_code; /* process exit code if failed */
507 @END
510 /* Create a new thread from the context of the parent */
511 @REQ(new_thread)
512 unsigned int access; /* wanted access rights */
513 unsigned int attributes; /* object attributes */
514 int suspend; /* new thread should be suspended on creation */
515 int request_fd; /* fd for request pipe */
516 @REPLY
517 thread_id_t tid; /* thread id */
518 obj_handle_t handle; /* thread handle (in the current process) */
519 @END
522 /* Retrieve the new process startup info */
523 @REQ(get_startup_info)
524 @REPLY
525 obj_handle_t exe_file; /* file handle for main exe */
526 obj_handle_t hstdin; /* handle for stdin */
527 obj_handle_t hstdout; /* handle for stdout */
528 obj_handle_t hstderr; /* handle for stderr */
529 VARARG(info,startup_info); /* startup information */
530 VARARG(env,unicode_str); /* environment */
531 @END
534 /* Signal the end of the process initialization */
535 @REQ(init_process_done)
536 void* module; /* main module base address */
537 void* entry; /* process entry point */
538 int gui; /* is it a GUI process? */
539 @END
542 /* Initialize a thread; called from the child after fork()/clone() */
543 @REQ(init_thread)
544 int unix_pid; /* Unix pid of new thread */
545 int unix_tid; /* Unix tid of new thread */
546 short int debug_level; /* new debug level */
547 short int pointer_bytes;/* Amount of bytes in a pointer (for the client) */
548 int teb; /* TEB of new thread (in thread address space) */
549 int peb; /* address of PEB (in thread address space) */
550 int entry; /* thread entry point (in thread address space) */
551 int ldt_copy; /* address of LDT copy (in thread address space) */
552 int reply_fd; /* fd for reply pipe */
553 int wait_fd; /* fd for blocking calls pipe */
554 int teb_high; /* upper 32-bits of TEB */
555 int peb_high; /* upper 32-bits op PEB */
556 int entry_high; /* upper 32-bits of entry point */
557 int ldt_copy_high;/* upper 32-bits of ldt copy high */
558 @REPLY
559 process_id_t pid; /* process id of the new thread's process */
560 thread_id_t tid; /* thread id of the new thread */
561 timeout_t server_start; /* swapped with info size for 64-bits alignment*/
562 data_size_t info_size; /* swapped with server_start for alignment */
563 int version; /* protocol version */
564 int pointer_bytes;/* Amount of bytes in a pointer (for the server) */
565 @END
568 /* Terminate a process */
569 @REQ(terminate_process)
570 obj_handle_t handle; /* process handle to terminate */
571 int exit_code; /* process exit code */
572 @REPLY
573 int self; /* suicide? */
574 @END
577 /* Terminate a thread */
578 @REQ(terminate_thread)
579 obj_handle_t handle; /* thread handle to terminate */
580 int exit_code; /* thread exit code */
581 @REPLY
582 int self; /* suicide? */
583 int last; /* last thread in this process? */
584 @END
587 /* Retrieve information about a process */
588 @REQ(get_process_info)
589 obj_handle_t handle; /* process handle */
590 @REPLY
591 process_id_t pid; /* server process id */
592 process_id_t ppid; /* server process id of parent */
593 int exit_code; /* process exit code */
594 int priority; /* priority class */
595 unsigned int affinity; /* process affinity mask */
596 void* peb; /* PEB address in process address space */
597 timeout_t start_time; /* process start time */
598 timeout_t end_time; /* process end time */
599 @END
602 /* Set a process informations */
603 @REQ(set_process_info)
604 obj_handle_t handle; /* process handle */
605 int mask; /* setting mask (see below) */
606 int priority; /* priority class */
607 unsigned int affinity; /* affinity mask */
608 @END
609 #define SET_PROCESS_INFO_PRIORITY 0x01
610 #define SET_PROCESS_INFO_AFFINITY 0x02
613 /* Retrieve information about a thread */
614 @REQ(get_thread_info)
615 obj_handle_t handle; /* thread handle */
616 thread_id_t tid_in; /* thread id (optional) */
617 @REPLY
618 process_id_t pid; /* server process id */
619 thread_id_t tid; /* server thread id */
620 void* teb; /* thread teb pointer */
621 int exit_code; /* thread exit code */
622 int priority; /* thread priority level */
623 unsigned int affinity; /* thread affinity mask */
624 timeout_t creation_time; /* thread creation time */
625 timeout_t exit_time; /* thread exit time */
626 int last; /* last thread in process */
627 @END
630 /* Set a thread informations */
631 @REQ(set_thread_info)
632 obj_handle_t handle; /* thread handle */
633 int mask; /* setting mask (see below) */
634 int priority; /* priority class */
635 unsigned int affinity; /* affinity mask */
636 obj_handle_t token; /* impersonation token */
637 @END
638 #define SET_THREAD_INFO_PRIORITY 0x01
639 #define SET_THREAD_INFO_AFFINITY 0x02
640 #define SET_THREAD_INFO_TOKEN 0x04
643 /* Retrieve information about a module */
644 @REQ(get_dll_info)
645 obj_handle_t handle; /* process handle */
646 void* base_address; /* base address of module */
647 @REPLY
648 void* entry_point;
649 data_size_t size; /* module size */
650 data_size_t filename_len; /* buffer len in bytes required to store filename */
651 VARARG(filename,unicode_str); /* file name of module */
652 @END
655 /* Suspend a thread */
656 @REQ(suspend_thread)
657 obj_handle_t handle; /* thread handle */
658 @REPLY
659 int count; /* new suspend count */
660 @END
663 /* Resume a thread */
664 @REQ(resume_thread)
665 obj_handle_t handle; /* thread handle */
666 @REPLY
667 int count; /* new suspend count */
668 @END
671 /* Notify the server that a dll has been loaded */
672 @REQ(load_dll)
673 obj_handle_t handle; /* file handle */
674 void* base; /* base address */
675 void* name; /* ptr to ptr to name (in process addr space) */
676 data_size_t size; /* dll size */
677 int dbg_offset; /* debug info offset */
678 int dbg_size; /* debug info size */
679 VARARG(filename,unicode_str); /* file name of dll */
680 @END
683 /* Notify the server that a dll is being unloaded */
684 @REQ(unload_dll)
685 void* base; /* base address */
686 @END
689 /* Queue an APC for a thread or process */
690 @REQ(queue_apc)
691 obj_handle_t handle; /* thread or process handle */
692 apc_call_t call; /* call arguments */
693 @REPLY
694 obj_handle_t handle; /* APC handle */
695 int self; /* run APC in caller itself? */
696 @END
699 /* Get the result of an APC call */
700 @REQ(get_apc_result)
701 obj_handle_t handle; /* handle to the APC */
702 @REPLY
703 apc_result_t result; /* result of the APC */
704 @END
707 /* Close a handle for the current process */
708 @REQ(close_handle)
709 obj_handle_t handle; /* handle to close */
710 @END
713 /* Set a handle information */
714 @REQ(set_handle_info)
715 obj_handle_t handle; /* handle we are interested in */
716 int flags; /* new handle flags */
717 int mask; /* mask for flags to set */
718 @REPLY
719 int old_flags; /* old flag value */
720 @END
723 /* Duplicate a handle */
724 @REQ(dup_handle)
725 obj_handle_t src_process; /* src process handle */
726 obj_handle_t src_handle; /* src handle to duplicate */
727 obj_handle_t dst_process; /* dst process handle */
728 unsigned int access; /* wanted access rights */
729 unsigned int attributes; /* object attributes */
730 unsigned int options; /* duplicate options (see below) */
731 @REPLY
732 obj_handle_t handle; /* duplicated handle in dst process */
733 int self; /* is the source the current process? */
734 int closed; /* whether the source handle has been closed */
735 @END
736 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
737 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
738 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
741 /* Open a handle to a process */
742 @REQ(open_process)
743 process_id_t pid; /* process id to open */
744 unsigned int access; /* wanted access rights */
745 unsigned int attributes; /* object attributes */
746 @REPLY
747 obj_handle_t handle; /* handle to the process */
748 @END
751 /* Open a handle to a thread */
752 @REQ(open_thread)
753 thread_id_t tid; /* thread id to open */
754 unsigned int access; /* wanted access rights */
755 unsigned int attributes; /* object attributes */
756 @REPLY
757 obj_handle_t handle; /* handle to the thread */
758 @END
761 /* Wait for handles */
762 @REQ(select)
763 int flags; /* wait flags (see below) */
764 void* cookie; /* magic cookie to return to client */
765 obj_handle_t signal; /* object to signal (0 if none) */
766 obj_handle_t prev_apc; /* handle to previous APC */
767 timeout_t timeout; /* timeout */
768 VARARG(result,apc_result); /* result of previous APC */
769 VARARG(handles,handles); /* handles to select on */
770 @REPLY
771 obj_handle_t apc_handle; /* handle to next APC */
772 timeout_t timeout; /* timeout converted to absolute */
773 apc_call_t call; /* APC call arguments */
774 @END
775 #define SELECT_ALL 1
776 #define SELECT_ALERTABLE 2
777 #define SELECT_INTERRUPTIBLE 4
780 /* Create an event */
781 @REQ(create_event)
782 unsigned int access; /* wanted access rights */
783 unsigned int attributes; /* object attributes */
784 int manual_reset; /* manual reset event */
785 int initial_state; /* initial state of the event */
786 VARARG(objattr,object_attributes); /* object attributes */
787 @REPLY
788 obj_handle_t handle; /* handle to the event */
789 @END
791 /* Event operation */
792 @REQ(event_op)
793 obj_handle_t handle; /* handle to event */
794 int op; /* event operation (see below) */
795 @END
796 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
799 /* Open an event */
800 @REQ(open_event)
801 unsigned int access; /* wanted access rights */
802 unsigned int attributes; /* object attributes */
803 obj_handle_t rootdir; /* root directory */
804 VARARG(name,unicode_str); /* object name */
805 @REPLY
806 obj_handle_t handle; /* handle to the event */
807 @END
810 /* Create a mutex */
811 @REQ(create_mutex)
812 unsigned int access; /* wanted access rights */
813 unsigned int attributes; /* object attributes */
814 int owned; /* initially owned? */
815 VARARG(objattr,object_attributes); /* object attributes */
816 @REPLY
817 obj_handle_t handle; /* handle to the mutex */
818 @END
821 /* Release a mutex */
822 @REQ(release_mutex)
823 obj_handle_t handle; /* handle to the mutex */
824 @REPLY
825 unsigned int prev_count; /* value of internal counter, before release */
826 @END
829 /* Open a mutex */
830 @REQ(open_mutex)
831 unsigned int access; /* wanted access rights */
832 unsigned int attributes; /* object attributes */
833 obj_handle_t rootdir; /* root directory */
834 VARARG(name,unicode_str); /* object name */
835 @REPLY
836 obj_handle_t handle; /* handle to the mutex */
837 @END
840 /* Create a semaphore */
841 @REQ(create_semaphore)
842 unsigned int access; /* wanted access rights */
843 unsigned int attributes; /* object attributes */
844 unsigned int initial; /* initial count */
845 unsigned int max; /* maximum count */
846 VARARG(objattr,object_attributes); /* object attributes */
847 @REPLY
848 obj_handle_t handle; /* handle to the semaphore */
849 @END
852 /* Release a semaphore */
853 @REQ(release_semaphore)
854 obj_handle_t handle; /* handle to the semaphore */
855 unsigned int count; /* count to add to semaphore */
856 @REPLY
857 unsigned int prev_count; /* previous semaphore count */
858 @END
861 /* Open a semaphore */
862 @REQ(open_semaphore)
863 unsigned int access; /* wanted access rights */
864 unsigned int attributes; /* object attributes */
865 obj_handle_t rootdir; /* root directory */
866 VARARG(name,unicode_str); /* object name */
867 @REPLY
868 obj_handle_t handle; /* handle to the semaphore */
869 @END
872 /* Create a file */
873 @REQ(create_file)
874 unsigned int access; /* wanted access rights */
875 unsigned int attributes; /* object attributes */
876 unsigned int sharing; /* sharing flags */
877 int create; /* file create action */
878 unsigned int options; /* file options */
879 unsigned int attrs; /* file attributes for creation */
880 VARARG(objattr,object_attributes); /* object attributes */
881 VARARG(filename,string); /* file name */
882 @REPLY
883 obj_handle_t handle; /* handle to the file */
884 @END
887 /* Open a file object */
888 @REQ(open_file_object)
889 unsigned int access; /* wanted access rights */
890 unsigned int attributes; /* open attributes */
891 obj_handle_t rootdir; /* root directory */
892 unsigned int sharing; /* sharing flags */
893 unsigned int options; /* file options */
894 VARARG(filename,unicode_str); /* file name */
895 @REPLY
896 obj_handle_t handle; /* handle to the file */
897 @END
900 /* Allocate a file handle for a Unix fd */
901 @REQ(alloc_file_handle)
902 unsigned int access; /* wanted access rights */
903 unsigned int attributes; /* object attributes */
904 int fd; /* file descriptor on the client side */
905 @REPLY
906 obj_handle_t handle; /* handle to the file */
907 @END
910 /* Get a Unix fd to access a file */
911 @REQ(get_handle_fd)
912 obj_handle_t handle; /* handle to the file */
913 @REPLY
914 int type; /* file type (see below) */
915 int removable; /* is file removable? */
916 unsigned int access; /* file access rights */
917 unsigned int options; /* file open options */
918 @END
919 enum server_fd_type
921 FD_TYPE_INVALID, /* invalid file (no associated fd) */
922 FD_TYPE_FILE, /* regular file */
923 FD_TYPE_DIR, /* directory */
924 FD_TYPE_SOCKET, /* socket */
925 FD_TYPE_SERIAL, /* serial port */
926 FD_TYPE_PIPE, /* named pipe */
927 FD_TYPE_MAILSLOT, /* mailslot */
928 FD_TYPE_CHAR, /* unspecified char device */
929 FD_TYPE_DEVICE, /* Windows device file */
930 FD_TYPE_NB_TYPES
934 /* Flush a file buffers */
935 @REQ(flush_file)
936 obj_handle_t handle; /* handle to the file */
937 @REPLY
938 obj_handle_t event; /* event set when finished */
939 @END
942 /* Lock a region of a file */
943 @REQ(lock_file)
944 obj_handle_t handle; /* handle to the file */
945 file_pos_t offset; /* offset of start of lock */
946 file_pos_t count; /* count of bytes to lock */
947 int shared; /* shared or exclusive lock? */
948 int wait; /* do we want to wait? */
949 @REPLY
950 obj_handle_t handle; /* handle to wait on */
951 int overlapped; /* is it an overlapped I/O handle? */
952 @END
955 /* Unlock a region of a file */
956 @REQ(unlock_file)
957 obj_handle_t handle; /* handle to the file */
958 file_pos_t offset; /* offset of start of unlock */
959 file_pos_t count; /* count of bytes to unlock */
960 @END
963 /* Create a socket */
964 @REQ(create_socket)
965 unsigned int access; /* wanted access rights */
966 unsigned int attributes; /* object attributes */
967 int family; /* family, see socket manpage */
968 int type; /* type, see socket manpage */
969 int protocol; /* protocol, see socket manpage */
970 unsigned int flags; /* socket flags */
971 @REPLY
972 obj_handle_t handle; /* handle to the new socket */
973 @END
976 /* Accept a socket */
977 @REQ(accept_socket)
978 obj_handle_t lhandle; /* handle to the listening socket */
979 unsigned int access; /* wanted access rights */
980 unsigned int attributes; /* object attributes */
981 @REPLY
982 obj_handle_t handle; /* handle to the new socket */
983 @END
986 /* Set socket event parameters */
987 @REQ(set_socket_event)
988 obj_handle_t handle; /* handle to the socket */
989 unsigned int mask; /* event mask */
990 obj_handle_t event; /* event object */
991 user_handle_t window; /* window to send the message to */
992 unsigned int msg; /* message to send */
993 @END
996 /* Get socket event parameters */
997 @REQ(get_socket_event)
998 obj_handle_t handle; /* handle to the socket */
999 int service; /* clear pending? */
1000 obj_handle_t c_event; /* event to clear */
1001 @REPLY
1002 unsigned int mask; /* event mask */
1003 unsigned int pmask; /* pending events */
1004 unsigned int state; /* status bits */
1005 VARARG(errors,ints); /* event errors */
1006 @END
1009 /* Reenable pending socket events */
1010 @REQ(enable_socket_event)
1011 obj_handle_t handle; /* handle to the socket */
1012 unsigned int mask; /* events to re-enable */
1013 unsigned int sstate; /* status bits to set */
1014 unsigned int cstate; /* status bits to clear */
1015 @END
1017 @REQ(set_socket_deferred)
1018 obj_handle_t handle; /* handle to the socket */
1019 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1020 @END
1022 /* Allocate a console (only used by a console renderer) */
1023 @REQ(alloc_console)
1024 unsigned int access; /* wanted access rights */
1025 unsigned int attributes; /* object attributes */
1026 process_id_t pid; /* pid of process which shall be attached to the console */
1027 @REPLY
1028 obj_handle_t handle_in; /* handle to console input */
1029 obj_handle_t event; /* handle to renderer events change notification */
1030 @END
1033 /* Free the console of the current process */
1034 @REQ(free_console)
1035 @END
1038 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1039 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1040 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1041 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1042 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1043 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1044 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1045 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1046 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1047 struct console_renderer_event
1049 short event;
1050 union
1052 struct update
1054 short top;
1055 short bottom;
1056 } update;
1057 struct resize
1059 short width;
1060 short height;
1061 } resize;
1062 struct cursor_pos
1064 short x;
1065 short y;
1066 } cursor_pos;
1067 struct cursor_geom
1069 short visible;
1070 short size;
1071 } cursor_geom;
1072 struct display
1074 short left;
1075 short top;
1076 short width;
1077 short height;
1078 } display;
1079 } u;
1082 /* retrieve console events for the renderer */
1083 @REQ(get_console_renderer_events)
1084 obj_handle_t handle; /* handle to console input events */
1085 @REPLY
1086 VARARG(data,bytes); /* the various console_renderer_events */
1087 @END
1090 /* Open a handle to the process console */
1091 @REQ(open_console)
1092 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1093 /* otherwise console_in handle to get active screen buffer? */
1094 unsigned int access; /* wanted access rights */
1095 unsigned int attributes; /* object attributes */
1096 int share; /* share mask (only for output handles) */
1097 @REPLY
1098 obj_handle_t handle; /* handle to the console */
1099 @END
1102 /* Get the input queue wait event */
1103 @REQ(get_console_wait_event)
1104 @REPLY
1105 obj_handle_t handle;
1106 @END
1108 /* Get a console mode (input or output) */
1109 @REQ(get_console_mode)
1110 obj_handle_t handle; /* handle to the console */
1111 @REPLY
1112 int mode; /* console mode */
1113 @END
1116 /* Set a console mode (input or output) */
1117 @REQ(set_console_mode)
1118 obj_handle_t handle; /* handle to the console */
1119 int mode; /* console mode */
1120 @END
1123 /* Set info about a console (input only) */
1124 @REQ(set_console_input_info)
1125 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1126 int mask; /* setting mask (see below) */
1127 obj_handle_t active_sb; /* active screen buffer */
1128 int history_mode; /* whether we duplicate lines in history */
1129 int history_size; /* number of lines in history */
1130 int edition_mode; /* index to the edition mode flavors */
1131 int input_cp; /* console input codepage */
1132 int output_cp; /* console output codepage */
1133 user_handle_t win; /* console window if backend supports it */
1134 VARARG(title,unicode_str); /* console title */
1135 @END
1136 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1137 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1138 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1139 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1140 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1141 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1142 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1143 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1146 /* Get info about a console (input only) */
1147 @REQ(get_console_input_info)
1148 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1149 @REPLY
1150 int history_mode; /* whether we duplicate lines in history */
1151 int history_size; /* number of lines in history */
1152 int history_index; /* number of used lines in history */
1153 int edition_mode; /* index to the edition mode flavors */
1154 int input_cp; /* console input codepage */
1155 int output_cp; /* console output codepage */
1156 user_handle_t win; /* console window if backend supports it */
1157 VARARG(title,unicode_str); /* console title */
1158 @END
1161 /* appends a string to console's history */
1162 @REQ(append_console_input_history)
1163 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1164 VARARG(line,unicode_str); /* line to add */
1165 @END
1168 /* appends a string to console's history */
1169 @REQ(get_console_input_history)
1170 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1171 int index; /* index to get line from */
1172 @REPLY
1173 int total; /* total length of line in Unicode chars */
1174 VARARG(line,unicode_str); /* line to add */
1175 @END
1178 /* creates a new screen buffer on process' console */
1179 @REQ(create_console_output)
1180 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1181 unsigned int access; /* wanted access rights */
1182 unsigned int attributes; /* object attributes */
1183 unsigned int share; /* sharing credentials */
1184 @REPLY
1185 obj_handle_t handle_out; /* handle to the screen buffer */
1186 @END
1189 /* Set info about a console (output only) */
1190 @REQ(set_console_output_info)
1191 obj_handle_t handle; /* handle to the console */
1192 int mask; /* setting mask (see below) */
1193 short int cursor_size; /* size of cursor (percentage filled) */
1194 short int cursor_visible;/* cursor visibility flag */
1195 short int cursor_x; /* position of cursor (x, y) */
1196 short int cursor_y;
1197 short int width; /* width of the screen buffer */
1198 short int height; /* height of the screen buffer */
1199 short int attr; /* default attribute */
1200 short int win_left; /* window actually displayed by renderer */
1201 short int win_top; /* the rect area is expressed withing the */
1202 short int win_right; /* boundaries of the screen buffer */
1203 short int win_bottom;
1204 short int max_width; /* maximum size (width x height) for the window */
1205 short int max_height;
1206 @END
1207 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1208 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1209 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1210 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1211 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1212 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1215 /* Get info about a console (output only) */
1216 @REQ(get_console_output_info)
1217 obj_handle_t handle; /* handle to the console */
1218 @REPLY
1219 short int cursor_size; /* size of cursor (percentage filled) */
1220 short int cursor_visible;/* cursor visibility flag */
1221 short int cursor_x; /* position of cursor (x, y) */
1222 short int cursor_y;
1223 short int width; /* width of the screen buffer */
1224 short int height; /* height of the screen buffer */
1225 short int attr; /* default attribute */
1226 short int win_left; /* window actually displayed by renderer */
1227 short int win_top; /* the rect area is expressed withing the */
1228 short int win_right; /* boundaries of the screen buffer */
1229 short int win_bottom;
1230 short int max_width; /* maximum size (width x height) for the window */
1231 short int max_height;
1232 @END
1234 /* Add input records to a console input queue */
1235 @REQ(write_console_input)
1236 obj_handle_t handle; /* handle to the console input */
1237 VARARG(rec,input_records); /* input records */
1238 @REPLY
1239 int written; /* number of records written */
1240 @END
1243 /* Fetch input records from a console input queue */
1244 @REQ(read_console_input)
1245 obj_handle_t handle; /* handle to the console input */
1246 int flush; /* flush the retrieved records from the queue? */
1247 @REPLY
1248 int read; /* number of records read */
1249 VARARG(rec,input_records); /* input records */
1250 @END
1253 /* write data (chars and/or attributes) in a screen buffer */
1254 @REQ(write_console_output)
1255 obj_handle_t handle; /* handle to the console output */
1256 int x; /* position where to start writing */
1257 int y;
1258 int mode; /* char info (see below) */
1259 int wrap; /* wrap around at end of line? */
1260 VARARG(data,bytes); /* info to write */
1261 @REPLY
1262 int written; /* number of char infos actually written */
1263 int width; /* width of screen buffer */
1264 int height; /* height of screen buffer */
1265 @END
1266 enum char_info_mode
1268 CHAR_INFO_MODE_TEXT, /* characters only */
1269 CHAR_INFO_MODE_ATTR, /* attributes only */
1270 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1271 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1275 /* fill a screen buffer with constant data (chars and/or attributes) */
1276 @REQ(fill_console_output)
1277 obj_handle_t handle; /* handle to the console output */
1278 int x; /* position where to start writing */
1279 int y;
1280 int mode; /* char info mode */
1281 int count; /* number to write */
1282 int wrap; /* wrap around at end of line? */
1283 char_info_t data; /* data to write */
1284 @REPLY
1285 int written; /* number of char infos actually written */
1286 @END
1289 /* read data (chars and/or attributes) from a screen buffer */
1290 @REQ(read_console_output)
1291 obj_handle_t handle; /* handle to the console output */
1292 int x; /* position (x,y) where to start reading */
1293 int y;
1294 int mode; /* char info mode */
1295 int wrap; /* wrap around at end of line? */
1296 @REPLY
1297 int width; /* width of screen buffer */
1298 int height; /* height of screen buffer */
1299 VARARG(data,bytes);
1300 @END
1303 /* move a rect (of data) in screen buffer content */
1304 @REQ(move_console_output)
1305 obj_handle_t handle; /* handle to the console output */
1306 short int x_src; /* position (x, y) of rect to start moving from */
1307 short int y_src;
1308 short int x_dst; /* position (x, y) of rect to move to */
1309 short int y_dst;
1310 short int w; /* size of the rect (width, height) to move */
1311 short int h;
1312 @END
1315 /* Sends a signal to a process group */
1316 @REQ(send_console_signal)
1317 int signal; /* the signal to send */
1318 process_id_t group_id; /* the group to send the signal to */
1319 @END
1322 /* enable directory change notifications */
1323 @REQ(read_directory_changes)
1324 unsigned int filter; /* notification filter */
1325 int subtree; /* watch the subtree? */
1326 int want_data; /* flag indicating whether change data should be collected */
1327 async_data_t async; /* async I/O parameters */
1328 @END
1331 @REQ(read_change)
1332 obj_handle_t handle;
1333 @REPLY
1334 int action; /* type of change */
1335 VARARG(name,string); /* name of directory entry that changed */
1336 @END
1339 /* Create a file mapping */
1340 @REQ(create_mapping)
1341 unsigned int access; /* wanted access rights */
1342 unsigned int attributes; /* object attributes */
1343 mem_size_t size; /* mapping size */
1344 unsigned int protect; /* protection flags (see below) */
1345 obj_handle_t file_handle; /* file handle */
1346 VARARG(objattr,object_attributes); /* object attributes */
1347 @REPLY
1348 obj_handle_t handle; /* handle to the mapping */
1349 @END
1350 /* per-page protection flags */
1351 #define VPROT_READ 0x01
1352 #define VPROT_WRITE 0x02
1353 #define VPROT_EXEC 0x04
1354 #define VPROT_WRITECOPY 0x08
1355 #define VPROT_GUARD 0x10
1356 #define VPROT_NOCACHE 0x20
1357 #define VPROT_COMMITTED 0x40
1358 #define VPROT_WRITEWATCH 0x80
1359 /* per-mapping protection flags */
1360 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1361 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1362 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1363 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1366 /* Open a mapping */
1367 @REQ(open_mapping)
1368 unsigned int access; /* wanted access rights */
1369 unsigned int attributes; /* object attributes */
1370 obj_handle_t rootdir; /* root directory */
1371 VARARG(name,unicode_str); /* object name */
1372 @REPLY
1373 obj_handle_t handle; /* handle to the mapping */
1374 @END
1377 /* Get information about a file mapping */
1378 @REQ(get_mapping_info)
1379 obj_handle_t handle; /* handle to the mapping */
1380 unsigned int access; /* wanted access rights */
1381 @REPLY
1382 mem_size_t size; /* mapping size */
1383 int protect; /* protection flags */
1384 int header_size; /* header size (for VPROT_IMAGE mapping) */
1385 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1386 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1387 obj_handle_t shared_file; /* shared mapping file handle */
1388 @END
1391 /* Get a range of committed pages in a file mapping */
1392 @REQ(get_mapping_committed_range)
1393 obj_handle_t handle; /* handle to the mapping */
1394 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1395 @REPLY
1396 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1397 int committed; /* whether it is a committed range */
1398 @END
1401 /* Add a range to the committed pages in a file mapping */
1402 @REQ(add_mapping_committed_range)
1403 obj_handle_t handle; /* handle to the mapping */
1404 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1405 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1406 @END
1409 #define SNAP_PROCESS 0x00000001
1410 #define SNAP_THREAD 0x00000002
1411 /* Create a snapshot */
1412 @REQ(create_snapshot)
1413 unsigned int attributes; /* object attributes */
1414 unsigned int flags; /* snapshot flags (SNAP_*) */
1415 @REPLY
1416 obj_handle_t handle; /* handle to the snapshot */
1417 @END
1420 /* Get the next process from a snapshot */
1421 @REQ(next_process)
1422 obj_handle_t handle; /* handle to the snapshot */
1423 int reset; /* reset snapshot position? */
1424 @REPLY
1425 int count; /* process usage count */
1426 process_id_t pid; /* process id */
1427 process_id_t ppid; /* parent process id */
1428 int threads; /* number of threads */
1429 int priority; /* process priority */
1430 int handles; /* number of handles */
1431 VARARG(filename,unicode_str); /* file name of main exe */
1432 @END
1435 /* Get the next thread from a snapshot */
1436 @REQ(next_thread)
1437 obj_handle_t handle; /* handle to the snapshot */
1438 int reset; /* reset snapshot position? */
1439 @REPLY
1440 int count; /* thread usage count */
1441 process_id_t pid; /* process id */
1442 thread_id_t tid; /* thread id */
1443 int base_pri; /* base priority */
1444 int delta_pri; /* delta priority */
1445 @END
1448 /* Wait for a debug event */
1449 @REQ(wait_debug_event)
1450 int get_handle; /* should we alloc a handle for waiting? */
1451 @REPLY
1452 process_id_t pid; /* process id */
1453 thread_id_t tid; /* thread id */
1454 obj_handle_t wait; /* wait handle if no event ready */
1455 VARARG(event,debug_event); /* debug event data */
1456 @END
1459 /* Queue an exception event */
1460 @REQ(queue_exception_event)
1461 int first; /* first chance exception? */
1462 VARARG(record,exc_event); /* thread context followed by exception record */
1463 @REPLY
1464 obj_handle_t handle; /* handle to the queued event */
1465 @END
1468 /* Retrieve the status of an exception event */
1469 @REQ(get_exception_status)
1470 obj_handle_t handle; /* handle to the queued event */
1471 @REPLY
1472 VARARG(context,context); /* modified thread context */
1473 @END
1476 /* Send an output string to the debugger */
1477 @REQ(output_debug_string)
1478 void* string; /* string to display (in debugged process address space) */
1479 int unicode; /* is it Unicode? */
1480 int length; /* string length */
1481 @END
1484 /* Continue a debug event */
1485 @REQ(continue_debug_event)
1486 process_id_t pid; /* process id to continue */
1487 thread_id_t tid; /* thread id to continue */
1488 int status; /* continuation status */
1489 @END
1492 /* Start/stop debugging an existing process */
1493 @REQ(debug_process)
1494 process_id_t pid; /* id of the process to debug */
1495 int attach; /* 1=attaching / 0=detaching from the process */
1496 @END
1499 /* Simulate a breakpoint in a process */
1500 @REQ(debug_break)
1501 obj_handle_t handle; /* process handle */
1502 @REPLY
1503 int self; /* was it the caller itself? */
1504 @END
1507 /* Set debugger kill on exit flag */
1508 @REQ(set_debugger_kill_on_exit)
1509 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1510 @END
1513 /* Read data from a process address space */
1514 @REQ(read_process_memory)
1515 obj_handle_t handle; /* process handle */
1516 void* addr; /* addr to read from */
1517 @REPLY
1518 VARARG(data,bytes); /* result data */
1519 @END
1522 /* Write data to a process address space */
1523 @REQ(write_process_memory)
1524 obj_handle_t handle; /* process handle */
1525 void* addr; /* addr to write to */
1526 VARARG(data,bytes); /* data to write */
1527 @END
1530 /* Create a registry key */
1531 @REQ(create_key)
1532 obj_handle_t parent; /* handle to the parent key */
1533 unsigned int access; /* desired access rights */
1534 unsigned int attributes; /* object attributes */
1535 unsigned int options; /* creation options */
1536 data_size_t namelen; /* length of key name in bytes */
1537 VARARG(name,unicode_str,namelen); /* key name */
1538 VARARG(class,unicode_str); /* class name */
1539 @REPLY
1540 obj_handle_t hkey; /* handle to the created key */
1541 int created; /* has it been newly created? */
1542 @END
1544 /* Open a registry key */
1545 @REQ(open_key)
1546 obj_handle_t parent; /* handle to the parent key */
1547 unsigned int access; /* desired access rights */
1548 unsigned int attributes; /* object attributes */
1549 VARARG(name,unicode_str); /* key name */
1550 @REPLY
1551 obj_handle_t hkey; /* handle to the open key */
1552 @END
1555 /* Delete a registry key */
1556 @REQ(delete_key)
1557 obj_handle_t hkey; /* handle to the key */
1558 @END
1561 /* Flush a registry key */
1562 @REQ(flush_key)
1563 obj_handle_t hkey; /* handle to the key */
1564 @END
1567 /* Enumerate registry subkeys */
1568 @REQ(enum_key)
1569 obj_handle_t hkey; /* handle to registry key */
1570 int index; /* index of subkey (or -1 for current key) */
1571 int info_class; /* requested information class */
1572 @REPLY
1573 int subkeys; /* number of subkeys */
1574 int max_subkey; /* longest subkey name */
1575 int max_class; /* longest class name */
1576 int values; /* number of values */
1577 int max_value; /* longest value name */
1578 int max_data; /* longest value data */
1579 timeout_t modif; /* last modification time */
1580 data_size_t total; /* total length needed for full name and class */
1581 data_size_t namelen; /* length of key name in bytes */
1582 VARARG(name,unicode_str,namelen); /* key name */
1583 VARARG(class,unicode_str); /* class name */
1584 @END
1587 /* Set a value of a registry key */
1588 @REQ(set_key_value)
1589 obj_handle_t hkey; /* handle to registry key */
1590 int type; /* value type */
1591 data_size_t namelen; /* length of value name in bytes */
1592 VARARG(name,unicode_str,namelen); /* value name */
1593 VARARG(data,bytes); /* value data */
1594 @END
1597 /* Retrieve the value of a registry key */
1598 @REQ(get_key_value)
1599 obj_handle_t hkey; /* handle to registry key */
1600 VARARG(name,unicode_str); /* value name */
1601 @REPLY
1602 int type; /* value type */
1603 data_size_t total; /* total length needed for data */
1604 VARARG(data,bytes); /* value data */
1605 @END
1608 /* Enumerate a value of a registry key */
1609 @REQ(enum_key_value)
1610 obj_handle_t hkey; /* handle to registry key */
1611 int index; /* value index */
1612 int info_class; /* requested information class */
1613 @REPLY
1614 int type; /* value type */
1615 data_size_t total; /* total length needed for full name and data */
1616 data_size_t namelen; /* length of value name in bytes */
1617 VARARG(name,unicode_str,namelen); /* value name */
1618 VARARG(data,bytes); /* value data */
1619 @END
1622 /* Delete a value of a registry key */
1623 @REQ(delete_key_value)
1624 obj_handle_t hkey; /* handle to registry key */
1625 VARARG(name,unicode_str); /* value name */
1626 @END
1629 /* Load a registry branch from a file */
1630 @REQ(load_registry)
1631 obj_handle_t hkey; /* root key to load to */
1632 obj_handle_t file; /* file to load from */
1633 VARARG(name,unicode_str); /* subkey name */
1634 @END
1637 /* UnLoad a registry branch from a file */
1638 @REQ(unload_registry)
1639 obj_handle_t hkey; /* root key to unload to */
1640 @END
1643 /* Save a registry branch to a file */
1644 @REQ(save_registry)
1645 obj_handle_t hkey; /* key to save */
1646 obj_handle_t file; /* file to save to */
1647 @END
1650 /* Add a registry key change notification */
1651 @REQ(set_registry_notification)
1652 obj_handle_t hkey; /* key to watch for changes */
1653 obj_handle_t event; /* event to set */
1654 int subtree; /* should we watch the whole subtree? */
1655 unsigned int filter; /* things to watch */
1656 @END
1659 /* Create a waitable timer */
1660 @REQ(create_timer)
1661 unsigned int access; /* wanted access rights */
1662 unsigned int attributes; /* object attributes */
1663 obj_handle_t rootdir; /* root directory */
1664 int manual; /* manual reset */
1665 VARARG(name,unicode_str); /* object name */
1666 @REPLY
1667 obj_handle_t handle; /* handle to the timer */
1668 @END
1671 /* Open a waitable timer */
1672 @REQ(open_timer)
1673 unsigned int access; /* wanted access rights */
1674 unsigned int attributes; /* object attributes */
1675 obj_handle_t rootdir; /* root directory */
1676 VARARG(name,unicode_str); /* object name */
1677 @REPLY
1678 obj_handle_t handle; /* handle to the timer */
1679 @END
1681 /* Set a waitable timer */
1682 @REQ(set_timer)
1683 obj_handle_t handle; /* handle to the timer */
1684 timeout_t expire; /* next expiration absolute time */
1685 int period; /* timer period in ms */
1686 void* callback; /* callback function */
1687 void* arg; /* callback argument */
1688 @REPLY
1689 int signaled; /* was the timer signaled before this call ? */
1690 @END
1692 /* Cancel a waitable timer */
1693 @REQ(cancel_timer)
1694 obj_handle_t handle; /* handle to the timer */
1695 @REPLY
1696 int signaled; /* was the timer signaled before this calltime ? */
1697 @END
1699 /* Get information on a waitable timer */
1700 @REQ(get_timer_info)
1701 obj_handle_t handle; /* handle to the timer */
1702 @REPLY
1703 timeout_t when; /* absolute time when the timer next expires */
1704 int signaled; /* is the timer signaled? */
1705 @END
1708 /* Retrieve the current context of a thread */
1709 @REQ(get_thread_context)
1710 obj_handle_t handle; /* thread handle */
1711 unsigned int flags; /* context flags */
1712 int suspend; /* if getting context during suspend */
1713 @REPLY
1714 int self; /* was it a handle to the current thread? */
1715 VARARG(context,context); /* thread context */
1716 @END
1719 /* Set the current context of a thread */
1720 @REQ(set_thread_context)
1721 obj_handle_t handle; /* thread handle */
1722 unsigned int flags; /* context flags */
1723 int suspend; /* if setting context during suspend */
1724 VARARG(context,context); /* thread context */
1725 @REPLY
1726 int self; /* was it a handle to the current thread? */
1727 @END
1730 /* Fetch a selector entry for a thread */
1731 @REQ(get_selector_entry)
1732 obj_handle_t handle; /* thread handle */
1733 int entry; /* LDT entry */
1734 @REPLY
1735 unsigned int base; /* selector base */
1736 unsigned int limit; /* selector limit */
1737 unsigned char flags; /* selector flags */
1738 @END
1741 /* Add an atom */
1742 @REQ(add_atom)
1743 obj_handle_t table; /* which table to add atom to */
1744 VARARG(name,unicode_str); /* atom name */
1745 @REPLY
1746 atom_t atom; /* resulting atom */
1747 @END
1750 /* Delete an atom */
1751 @REQ(delete_atom)
1752 obj_handle_t table; /* which table to delete atom from */
1753 atom_t atom; /* atom handle */
1754 @END
1757 /* Find an atom */
1758 @REQ(find_atom)
1759 obj_handle_t table; /* which table to find atom from */
1760 VARARG(name,unicode_str); /* atom name */
1761 @REPLY
1762 atom_t atom; /* atom handle */
1763 @END
1766 /* Get information about an atom */
1767 @REQ(get_atom_information)
1768 obj_handle_t table; /* which table to find atom from */
1769 atom_t atom; /* atom handle */
1770 @REPLY
1771 int count; /* atom lock count */
1772 int pinned; /* whether the atom has been pinned */
1773 data_size_t total; /* actual length of atom name */
1774 VARARG(name,unicode_str); /* atom name */
1775 @END
1778 /* Set information about an atom */
1779 @REQ(set_atom_information)
1780 obj_handle_t table; /* which table to find atom from */
1781 atom_t atom; /* atom handle */
1782 int pinned; /* whether to bump atom information */
1783 @END
1786 /* Empty an atom table */
1787 @REQ(empty_atom_table)
1788 obj_handle_t table; /* which table to find atom from */
1789 int if_pinned; /* whether to delete pinned atoms */
1790 @END
1793 /* Init an atom table */
1794 @REQ(init_atom_table)
1795 int entries; /* number of entries (only for local) */
1796 @REPLY
1797 obj_handle_t table; /* handle to the atom table */
1798 @END
1801 /* Get the message queue of the current thread */
1802 @REQ(get_msg_queue)
1803 @REPLY
1804 obj_handle_t handle; /* handle to the queue */
1805 @END
1808 /* Set the file descriptor associated to the current thread queue */
1809 @REQ(set_queue_fd)
1810 obj_handle_t handle; /* handle to the file descriptor */
1811 @END
1814 /* Set the current message queue wakeup mask */
1815 @REQ(set_queue_mask)
1816 unsigned int wake_mask; /* wakeup bits mask */
1817 unsigned int changed_mask; /* changed bits mask */
1818 int skip_wait; /* will we skip waiting if signaled? */
1819 @REPLY
1820 unsigned int wake_bits; /* current wake bits */
1821 unsigned int changed_bits; /* current changed bits */
1822 @END
1825 /* Get the current message queue status */
1826 @REQ(get_queue_status)
1827 int clear; /* should we clear the change bits? */
1828 @REPLY
1829 unsigned int wake_bits; /* wake bits */
1830 unsigned int changed_bits; /* changed bits since last time */
1831 @END
1834 /* Retrieve the process idle event */
1835 @REQ(get_process_idle_event)
1836 obj_handle_t handle; /* process handle */
1837 @REPLY
1838 obj_handle_t event; /* handle to idle event */
1839 @END
1842 /* Send a message to a thread queue */
1843 @REQ(send_message)
1844 thread_id_t id; /* thread id */
1845 int type; /* message type (see below) */
1846 int flags; /* message flags (see below) */
1847 user_handle_t win; /* window handle */
1848 unsigned int msg; /* message code */
1849 lparam_t wparam; /* parameters */
1850 lparam_t lparam; /* parameters */
1851 timeout_t timeout; /* timeout for reply */
1852 VARARG(data,message_data); /* message data for sent messages */
1853 @END
1855 @REQ(post_quit_message)
1856 int exit_code; /* exit code to return */
1857 @END
1859 enum message_type
1861 MSG_ASCII, /* Ascii message (from SendMessageA) */
1862 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1863 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1864 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1865 MSG_CALLBACK_RESULT,/* result of a callback message */
1866 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1867 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1868 MSG_HARDWARE, /* hardware message */
1869 MSG_WINEVENT /* winevent message */
1871 #define SEND_MSG_ABORT_IF_HUNG 0x01
1874 /* Send a hardware message to a thread queue */
1875 @REQ(send_hardware_message)
1876 thread_id_t id; /* thread id */
1877 user_handle_t win; /* window handle */
1878 unsigned int msg; /* message code */
1879 lparam_t wparam; /* parameters */
1880 lparam_t lparam; /* parameters */
1881 lparam_t info; /* extra info */
1882 int x; /* x position */
1883 int y; /* y position */
1884 unsigned int time; /* message time */
1885 @END
1888 /* Get a message from the current queue */
1889 @REQ(get_message)
1890 unsigned int flags; /* PM_* flags */
1891 user_handle_t get_win; /* window handle to get */
1892 unsigned int get_first; /* first message code to get */
1893 unsigned int get_last; /* last message code to get */
1894 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1895 unsigned int wake_mask; /* wakeup bits mask */
1896 unsigned int changed_mask; /* changed bits mask */
1897 @REPLY
1898 user_handle_t win; /* window handle */
1899 unsigned int msg; /* message code */
1900 lparam_t wparam; /* parameters */
1901 lparam_t lparam; /* parameters */
1902 int type; /* message type */
1903 unsigned int time; /* message time */
1904 unsigned int active_hooks; /* active hooks bitmap */
1905 data_size_t total; /* total size of extra data */
1906 VARARG(data,message_data); /* message data for sent messages */
1907 @END
1910 /* Reply to a sent message */
1911 @REQ(reply_message)
1912 int remove; /* should we remove the message? */
1913 lparam_t result; /* message result */
1914 VARARG(data,bytes); /* message data for sent messages */
1915 @END
1918 /* Accept the current hardware message */
1919 @REQ(accept_hardware_message)
1920 unsigned int hw_id; /* id of the hardware message */
1921 int remove; /* should we remove the message? */
1922 user_handle_t new_win; /* new destination window for current message */
1923 @END
1926 /* Retrieve the reply for the last message sent */
1927 @REQ(get_message_reply)
1928 int cancel; /* cancel message if not ready? */
1929 @REPLY
1930 lparam_t result; /* message result */
1931 VARARG(data,bytes); /* message data for sent messages */
1932 @END
1935 /* Set a window timer */
1936 @REQ(set_win_timer)
1937 user_handle_t win; /* window handle */
1938 unsigned int msg; /* message to post */
1939 unsigned int rate; /* timer rate in ms */
1940 lparam_t id; /* timer id */
1941 lparam_t lparam; /* message lparam (callback proc) */
1942 @REPLY
1943 lparam_t id; /* timer id */
1944 @END
1947 /* Kill a window timer */
1948 @REQ(kill_win_timer)
1949 user_handle_t win; /* window handle */
1950 lparam_t id; /* timer id */
1951 unsigned int msg; /* message to post */
1952 @END
1955 /* check if the thread owning the window is hung */
1956 @REQ(is_window_hung)
1957 user_handle_t win; /* window handle */
1958 @REPLY
1959 int is_hung;
1960 @END
1963 /* Retrieve info about a serial port */
1964 @REQ(get_serial_info)
1965 obj_handle_t handle; /* handle to comm port */
1966 @REPLY
1967 unsigned int readinterval;
1968 unsigned int readconst;
1969 unsigned int readmult;
1970 unsigned int writeconst;
1971 unsigned int writemult;
1972 unsigned int eventmask;
1973 @END
1976 /* Set info about a serial port */
1977 @REQ(set_serial_info)
1978 obj_handle_t handle; /* handle to comm port */
1979 int flags; /* bitmask to set values (see below) */
1980 unsigned int readinterval;
1981 unsigned int readconst;
1982 unsigned int readmult;
1983 unsigned int writeconst;
1984 unsigned int writemult;
1985 unsigned int eventmask;
1986 @END
1987 #define SERIALINFO_SET_TIMEOUTS 0x01
1988 #define SERIALINFO_SET_MASK 0x02
1991 /* Create an async I/O */
1992 @REQ(register_async)
1993 int type; /* type of queue to look after */
1994 int count; /* count - usually # of bytes to be read/written */
1995 async_data_t async; /* async I/O parameters */
1996 @END
1997 #define ASYNC_TYPE_READ 0x01
1998 #define ASYNC_TYPE_WRITE 0x02
1999 #define ASYNC_TYPE_WAIT 0x03
2002 /* Cancel all async op on a fd */
2003 @REQ(cancel_async)
2004 obj_handle_t handle; /* handle to comm port, socket or file */
2005 @END
2008 /* Perform an ioctl on a file */
2009 @REQ(ioctl)
2010 ioctl_code_t code; /* ioctl code */
2011 async_data_t async; /* async I/O parameters */
2012 VARARG(in_data,bytes); /* ioctl input data */
2013 @REPLY
2014 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2015 unsigned int options; /* device open options */
2016 VARARG(out_data,bytes); /* ioctl output data */
2017 @END
2020 /* Retrieve results of an async ioctl */
2021 @REQ(get_ioctl_result)
2022 obj_handle_t handle; /* handle to the device */
2023 void* user_arg; /* user arg used to identify the request */
2024 @REPLY
2025 VARARG(out_data,bytes); /* ioctl output data */
2026 @END
2029 /* Create a named pipe */
2030 @REQ(create_named_pipe)
2031 unsigned int access;
2032 unsigned int attributes; /* object attributes */
2033 obj_handle_t rootdir; /* root directory */
2034 unsigned int options;
2035 unsigned int flags;
2036 unsigned int maxinstances;
2037 unsigned int outsize;
2038 unsigned int insize;
2039 timeout_t timeout;
2040 VARARG(name,unicode_str); /* pipe name */
2041 @REPLY
2042 obj_handle_t handle; /* handle to the pipe */
2043 @END
2045 /* flags in create_named_pipe and get_named_pipe_info */
2046 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2047 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2048 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2049 #define NAMED_PIPE_SERVER_END 0x8000
2052 @REQ(get_named_pipe_info)
2053 obj_handle_t handle;
2054 @REPLY
2055 unsigned int flags;
2056 unsigned int maxinstances;
2057 unsigned int instances;
2058 unsigned int outsize;
2059 unsigned int insize;
2060 @END
2063 /* Create a window */
2064 @REQ(create_window)
2065 user_handle_t parent; /* parent window */
2066 user_handle_t owner; /* owner window */
2067 atom_t atom; /* class atom */
2068 void* instance; /* module instance */
2069 VARARG(class,unicode_str); /* class name */
2070 @REPLY
2071 user_handle_t handle; /* created window */
2072 user_handle_t parent; /* full handle of parent */
2073 user_handle_t owner; /* full handle of owner */
2074 int extra; /* number of extra bytes */
2075 void* class_ptr; /* pointer to class in client address space */
2076 @END
2079 /* Destroy a window */
2080 @REQ(destroy_window)
2081 user_handle_t handle; /* handle to the window */
2082 @END
2085 /* Retrieve the desktop window for the current thread */
2086 @REQ(get_desktop_window)
2087 int force; /* force creation if it doesn't exist */
2088 @REPLY
2089 user_handle_t top_window; /* handle to the desktop window */
2090 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2091 @END
2094 /* Set a window owner */
2095 @REQ(set_window_owner)
2096 user_handle_t handle; /* handle to the window */
2097 user_handle_t owner; /* new owner */
2098 @REPLY
2099 user_handle_t full_owner; /* full handle of new owner */
2100 user_handle_t prev_owner; /* full handle of previous owner */
2101 @END
2104 /* Get information from a window handle */
2105 @REQ(get_window_info)
2106 user_handle_t handle; /* handle to the window */
2107 @REPLY
2108 user_handle_t full_handle; /* full 32-bit handle */
2109 user_handle_t last_active; /* last active popup */
2110 process_id_t pid; /* process owning the window */
2111 thread_id_t tid; /* thread owning the window */
2112 atom_t atom; /* class atom */
2113 int is_unicode; /* ANSI or unicode */
2114 @END
2117 /* Set some information in a window */
2118 @REQ(set_window_info)
2119 unsigned int flags; /* flags for fields to set (see below) */
2120 user_handle_t handle; /* handle to the window */
2121 unsigned int style; /* window style */
2122 unsigned int ex_style; /* window extended style */
2123 unsigned int id; /* window id */
2124 int is_unicode; /* ANSI or unicode */
2125 void* instance; /* creator instance */
2126 lparam_t user_data; /* user-specific data */
2127 int extra_offset; /* offset to set in extra bytes */
2128 data_size_t extra_size; /* size to set in extra bytes */
2129 lparam_t extra_value; /* value to set in extra bytes */
2130 @REPLY
2131 unsigned int old_style; /* old window style */
2132 unsigned int old_ex_style; /* old window extended style */
2133 unsigned int old_id; /* old window id */
2134 void* old_instance; /* old creator instance */
2135 lparam_t old_user_data; /* old user-specific data */
2136 lparam_t old_extra_value; /* old value in extra bytes */
2137 @END
2138 #define SET_WIN_STYLE 0x01
2139 #define SET_WIN_EXSTYLE 0x02
2140 #define SET_WIN_ID 0x04
2141 #define SET_WIN_INSTANCE 0x08
2142 #define SET_WIN_USERDATA 0x10
2143 #define SET_WIN_EXTRA 0x20
2144 #define SET_WIN_UNICODE 0x40
2147 /* Set the parent of a window */
2148 @REQ(set_parent)
2149 user_handle_t handle; /* handle to the window */
2150 user_handle_t parent; /* handle to the parent */
2151 @REPLY
2152 user_handle_t old_parent; /* old parent window */
2153 user_handle_t full_parent; /* full handle of new parent */
2154 @END
2157 /* Get a list of the window parents, up to the root of the tree */
2158 @REQ(get_window_parents)
2159 user_handle_t handle; /* handle to the window */
2160 @REPLY
2161 int count; /* total count of parents */
2162 VARARG(parents,user_handles); /* parent handles */
2163 @END
2166 /* Get a list of the window children */
2167 @REQ(get_window_children)
2168 obj_handle_t desktop; /* handle to desktop */
2169 user_handle_t parent; /* parent window */
2170 atom_t atom; /* class atom for the listed children */
2171 thread_id_t tid; /* thread owning the listed children */
2172 VARARG(class,unicode_str); /* class name */
2173 @REPLY
2174 int count; /* total count of children */
2175 VARARG(children,user_handles); /* children handles */
2176 @END
2179 /* Get a list of the window children that contain a given point */
2180 @REQ(get_window_children_from_point)
2181 user_handle_t parent; /* parent window */
2182 int x; /* point in parent coordinates */
2183 int y;
2184 @REPLY
2185 int count; /* total count of children */
2186 VARARG(children,user_handles); /* children handles */
2187 @END
2190 /* Get window tree information from a window handle */
2191 @REQ(get_window_tree)
2192 user_handle_t handle; /* handle to the window */
2193 @REPLY
2194 user_handle_t parent; /* parent window */
2195 user_handle_t owner; /* owner window */
2196 user_handle_t next_sibling; /* next sibling in Z-order */
2197 user_handle_t prev_sibling; /* prev sibling in Z-order */
2198 user_handle_t first_sibling; /* first sibling in Z-order */
2199 user_handle_t last_sibling; /* last sibling in Z-order */
2200 user_handle_t first_child; /* first child */
2201 user_handle_t last_child; /* last child */
2202 @END
2204 /* Set the position and Z order of a window */
2205 @REQ(set_window_pos)
2206 unsigned int flags; /* SWP_* flags */
2207 user_handle_t handle; /* handle to the window */
2208 user_handle_t previous; /* previous window in Z order */
2209 rectangle_t window; /* window rectangle */
2210 rectangle_t client; /* client rectangle */
2211 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2212 @REPLY
2213 unsigned int new_style; /* new window style */
2214 unsigned int new_ex_style; /* new window extended style */
2215 @END
2218 /* Get the window and client rectangles of a window */
2219 @REQ(get_window_rectangles)
2220 user_handle_t handle; /* handle to the window */
2221 @REPLY
2222 rectangle_t window; /* window rectangle */
2223 rectangle_t visible; /* visible part of the window rectangle */
2224 rectangle_t client; /* client rectangle */
2225 @END
2228 /* Get the window text */
2229 @REQ(get_window_text)
2230 user_handle_t handle; /* handle to the window */
2231 @REPLY
2232 VARARG(text,unicode_str); /* window text */
2233 @END
2236 /* Set the window text */
2237 @REQ(set_window_text)
2238 user_handle_t handle; /* handle to the window */
2239 VARARG(text,unicode_str); /* window text */
2240 @END
2243 /* Get the coordinates offset between two windows */
2244 @REQ(get_windows_offset)
2245 user_handle_t from; /* handle to the first window */
2246 user_handle_t to; /* handle to the second window */
2247 @REPLY
2248 int x; /* x coordinate offset */
2249 int y; /* y coordinate offset */
2250 @END
2253 /* Get the visible region of a window */
2254 @REQ(get_visible_region)
2255 user_handle_t window; /* handle to the window */
2256 unsigned int flags; /* DCX flags */
2257 @REPLY
2258 user_handle_t top_win; /* top window to clip against */
2259 rectangle_t top_rect; /* top window visible rect with screen coords */
2260 rectangle_t win_rect; /* window rect in screen coords */
2261 data_size_t total_size; /* total size of the resulting region */
2262 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2263 @END
2266 /* Get the window region */
2267 @REQ(get_window_region)
2268 user_handle_t window; /* handle to the window */
2269 @REPLY
2270 data_size_t total_size; /* total size of the resulting region */
2271 VARARG(region,rectangles); /* list of rectangles for the region */
2272 @END
2275 /* Set the window region */
2276 @REQ(set_window_region)
2277 user_handle_t window; /* handle to the window */
2278 int redraw; /* redraw the window? */
2279 VARARG(region,rectangles); /* list of rectangles for the region */
2280 @END
2283 /* Get the window update region */
2284 @REQ(get_update_region)
2285 user_handle_t window; /* handle to the window */
2286 user_handle_t from_child; /* child to start searching from */
2287 unsigned int flags; /* update flags (see below) */
2288 @REPLY
2289 user_handle_t child; /* child to repaint (or window itself) */
2290 unsigned int flags; /* resulting update flags (see below) */
2291 data_size_t total_size; /* total size of the resulting region */
2292 VARARG(region,rectangles); /* list of rectangles for the region */
2293 @END
2294 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2295 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2296 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2297 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2298 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2299 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2300 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2301 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2304 /* Update the z order of a window so that a given rectangle is fully visible */
2305 @REQ(update_window_zorder)
2306 user_handle_t window; /* handle to the window */
2307 rectangle_t rect; /* rectangle that must be visible */
2308 @END
2311 /* Mark parts of a window as needing a redraw */
2312 @REQ(redraw_window)
2313 user_handle_t window; /* handle to the window */
2314 unsigned int flags; /* RDW_* flags */
2315 VARARG(region,rectangles); /* list of rectangles for the region */
2316 @END
2319 /* Set a window property */
2320 @REQ(set_window_property)
2321 user_handle_t window; /* handle to the window */
2322 lparam_t data; /* data to store */
2323 atom_t atom; /* property atom (if no name specified) */
2324 VARARG(name,unicode_str); /* property name */
2325 @END
2328 /* Remove a window property */
2329 @REQ(remove_window_property)
2330 user_handle_t window; /* handle to the window */
2331 atom_t atom; /* property atom (if no name specified) */
2332 VARARG(name,unicode_str); /* property name */
2333 @REPLY
2334 lparam_t data; /* data stored in property */
2335 @END
2338 /* Get a window property */
2339 @REQ(get_window_property)
2340 user_handle_t window; /* handle to the window */
2341 atom_t atom; /* property atom (if no name specified) */
2342 VARARG(name,unicode_str); /* property name */
2343 @REPLY
2344 lparam_t data; /* data stored in property */
2345 @END
2348 /* Get the list of properties of a window */
2349 @REQ(get_window_properties)
2350 user_handle_t window; /* handle to the window */
2351 @REPLY
2352 int total; /* total number of properties */
2353 VARARG(props,properties); /* list of properties */
2354 @END
2357 /* Create a window station */
2358 @REQ(create_winstation)
2359 unsigned int flags; /* window station flags */
2360 unsigned int access; /* wanted access rights */
2361 unsigned int attributes; /* object attributes */
2362 VARARG(name,unicode_str); /* object name */
2363 @REPLY
2364 obj_handle_t handle; /* handle to the window station */
2365 @END
2368 /* Open a handle to a window station */
2369 @REQ(open_winstation)
2370 unsigned int access; /* wanted access rights */
2371 unsigned int attributes; /* object attributes */
2372 VARARG(name,unicode_str); /* object name */
2373 @REPLY
2374 obj_handle_t handle; /* handle to the window station */
2375 @END
2378 /* Close a window station */
2379 @REQ(close_winstation)
2380 obj_handle_t handle; /* handle to the window station */
2381 @END
2384 /* Get the process current window station */
2385 @REQ(get_process_winstation)
2386 @REPLY
2387 obj_handle_t handle; /* handle to the window station */
2388 @END
2391 /* Set the process current window station */
2392 @REQ(set_process_winstation)
2393 obj_handle_t handle; /* handle to the window station */
2394 @END
2397 /* Enumerate window stations */
2398 @REQ(enum_winstation)
2399 unsigned int index; /* current index */
2400 @REPLY
2401 unsigned int next; /* next index */
2402 VARARG(name,unicode_str); /* window station name */
2403 @END
2406 /* Create a desktop */
2407 @REQ(create_desktop)
2408 unsigned int flags; /* desktop flags */
2409 unsigned int access; /* wanted access rights */
2410 unsigned int attributes; /* object attributes */
2411 VARARG(name,unicode_str); /* object name */
2412 @REPLY
2413 obj_handle_t handle; /* handle to the desktop */
2414 @END
2417 /* Open a handle to a desktop */
2418 @REQ(open_desktop)
2419 obj_handle_t winsta; /* window station to open (null allowed) */
2420 unsigned int flags; /* desktop flags */
2421 unsigned int access; /* wanted access rights */
2422 unsigned int attributes; /* object attributes */
2423 VARARG(name,unicode_str); /* object name */
2424 @REPLY
2425 obj_handle_t handle; /* handle to the desktop */
2426 @END
2429 /* Close a desktop */
2430 @REQ(close_desktop)
2431 obj_handle_t handle; /* handle to the desktop */
2432 @END
2435 /* Get the thread current desktop */
2436 @REQ(get_thread_desktop)
2437 thread_id_t tid; /* thread id */
2438 @REPLY
2439 obj_handle_t handle; /* handle to the desktop */
2440 @END
2443 /* Set the thread current desktop */
2444 @REQ(set_thread_desktop)
2445 obj_handle_t handle; /* handle to the desktop */
2446 @END
2449 /* Enumerate desktops */
2450 @REQ(enum_desktop)
2451 obj_handle_t winstation; /* handle to the window station */
2452 unsigned int index; /* current index */
2453 @REPLY
2454 unsigned int next; /* next index */
2455 VARARG(name,unicode_str); /* window station name */
2456 @END
2459 /* Get/set information about a user object (window station or desktop) */
2460 @REQ(set_user_object_info)
2461 obj_handle_t handle; /* handle to the object */
2462 unsigned int flags; /* information to set */
2463 unsigned int obj_flags; /* new object flags */
2464 @REPLY
2465 int is_desktop; /* is object a desktop? */
2466 unsigned int old_obj_flags; /* old object flags */
2467 VARARG(name,unicode_str); /* object name */
2468 @END
2469 #define SET_USER_OBJECT_FLAGS 1
2472 /* Attach (or detach) thread inputs */
2473 @REQ(attach_thread_input)
2474 thread_id_t tid_from; /* thread to be attached */
2475 thread_id_t tid_to; /* thread to which tid_from should be attached */
2476 int attach; /* is it an attach? */
2477 @END
2480 /* Get input data for a given thread */
2481 @REQ(get_thread_input)
2482 thread_id_t tid; /* id of thread */
2483 @REPLY
2484 user_handle_t focus; /* handle to the focus window */
2485 user_handle_t capture; /* handle to the capture window */
2486 user_handle_t active; /* handle to the active window */
2487 user_handle_t foreground; /* handle to the global foreground window */
2488 user_handle_t menu_owner; /* handle to the menu owner */
2489 user_handle_t move_size; /* handle to the moving/resizing window */
2490 user_handle_t caret; /* handle to the caret window */
2491 rectangle_t rect; /* caret rectangle */
2492 @END
2495 /* Get the time of the last input event */
2496 @REQ(get_last_input_time)
2497 @REPLY
2498 unsigned int time;
2499 @END
2502 /* Retrieve queue keyboard state for a given thread */
2503 @REQ(get_key_state)
2504 thread_id_t tid; /* id of thread */
2505 int key; /* optional key code or -1 */
2506 @REPLY
2507 unsigned char state; /* state of specified key */
2508 VARARG(keystate,bytes); /* state array for all the keys */
2509 @END
2511 /* Set queue keyboard state for a given thread */
2512 @REQ(set_key_state)
2513 thread_id_t tid; /* id of thread */
2514 VARARG(keystate,bytes); /* state array for all the keys */
2515 @END
2517 /* Set the system foreground window */
2518 @REQ(set_foreground_window)
2519 user_handle_t handle; /* handle to the foreground window */
2520 @REPLY
2521 user_handle_t previous; /* handle to the previous foreground window */
2522 int send_msg_old; /* whether we have to send a msg to the old window */
2523 int send_msg_new; /* whether we have to send a msg to the new window */
2524 @END
2526 /* Set the current thread focus window */
2527 @REQ(set_focus_window)
2528 user_handle_t handle; /* handle to the focus window */
2529 @REPLY
2530 user_handle_t previous; /* handle to the previous focus window */
2531 @END
2533 /* Set the current thread active window */
2534 @REQ(set_active_window)
2535 user_handle_t handle; /* handle to the active window */
2536 @REPLY
2537 user_handle_t previous; /* handle to the previous active window */
2538 @END
2540 /* Set the current thread capture window */
2541 @REQ(set_capture_window)
2542 user_handle_t handle; /* handle to the capture window */
2543 unsigned int flags; /* capture flags (see below) */
2544 @REPLY
2545 user_handle_t previous; /* handle to the previous capture window */
2546 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2547 @END
2548 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2549 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2552 /* Set the current thread caret window */
2553 @REQ(set_caret_window)
2554 user_handle_t handle; /* handle to the caret window */
2555 int width; /* caret width */
2556 int height; /* caret height */
2557 @REPLY
2558 user_handle_t previous; /* handle to the previous caret window */
2559 rectangle_t old_rect; /* previous caret rectangle */
2560 int old_hide; /* previous hide count */
2561 int old_state; /* previous caret state (1=on, 0=off) */
2562 @END
2565 /* Set the current thread caret information */
2566 @REQ(set_caret_info)
2567 unsigned int flags; /* caret flags (see below) */
2568 user_handle_t handle; /* handle to the caret window */
2569 int x; /* caret x position */
2570 int y; /* caret y position */
2571 int hide; /* increment for hide count (can be negative to show it) */
2572 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2573 @REPLY
2574 user_handle_t full_handle; /* handle to the current caret window */
2575 rectangle_t old_rect; /* previous caret rectangle */
2576 int old_hide; /* previous hide count */
2577 int old_state; /* previous caret state (1=on, 0=off) */
2578 @END
2579 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2580 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2581 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2584 /* Set a window hook */
2585 @REQ(set_hook)
2586 int id; /* id of the hook */
2587 process_id_t pid; /* id of process to set the hook into */
2588 thread_id_t tid; /* id of thread to set the hook into */
2589 int event_min;
2590 int event_max;
2591 int flags;
2592 void* proc; /* hook procedure */
2593 int unicode; /* is it a unicode hook? */
2594 VARARG(module,unicode_str); /* module name */
2595 @REPLY
2596 user_handle_t handle; /* handle to the hook */
2597 unsigned int active_hooks; /* active hooks bitmap */
2598 @END
2601 /* Remove a window hook */
2602 @REQ(remove_hook)
2603 user_handle_t handle; /* handle to the hook */
2604 int id; /* id of the hook if handle is 0 */
2605 void* proc; /* hook procedure if handle is 0 */
2606 @REPLY
2607 unsigned int active_hooks; /* active hooks bitmap */
2608 @END
2611 /* Start calling a hook chain */
2612 @REQ(start_hook_chain)
2613 int id; /* id of the hook */
2614 int event; /* signalled event */
2615 user_handle_t window; /* handle to the event window */
2616 int object_id; /* object id for out of context winevent */
2617 int child_id; /* child id for out of context winevent */
2618 @REPLY
2619 user_handle_t handle; /* handle to the next hook */
2620 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2621 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2622 void* proc; /* hook procedure */
2623 int unicode; /* is it a unicode hook? */
2624 unsigned int active_hooks; /* active hooks bitmap */
2625 VARARG(module,unicode_str); /* module name */
2626 @END
2629 /* Finished calling a hook chain */
2630 @REQ(finish_hook_chain)
2631 int id; /* id of the hook */
2632 @END
2635 /* Get the hook information */
2636 @REQ(get_hook_info)
2637 user_handle_t handle; /* handle to the current hook */
2638 int get_next; /* do we want info about current or next hook? */
2639 int event; /* signalled event */
2640 user_handle_t window; /* handle to the event window */
2641 int object_id; /* object id for out of context winevent */
2642 int child_id; /* child id for out of context winevent */
2643 @REPLY
2644 user_handle_t handle; /* handle to the hook */
2645 int id; /* id of the hook */
2646 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2647 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2648 void* proc; /* hook procedure */
2649 int unicode; /* is it a unicode hook? */
2650 VARARG(module,unicode_str); /* module name */
2651 @END
2654 /* Create a window class */
2655 @REQ(create_class)
2656 int local; /* is it a local class? */
2657 atom_t atom; /* class atom */
2658 unsigned int style; /* class style */
2659 void* instance; /* module instance */
2660 int extra; /* number of extra class bytes */
2661 int win_extra; /* number of window extra bytes */
2662 void* client_ptr; /* pointer to class in client address space */
2663 VARARG(name,unicode_str); /* class name */
2664 @REPLY
2665 atom_t atom; /* resulting class atom */
2666 @END
2669 /* Destroy a window class */
2670 @REQ(destroy_class)
2671 atom_t atom; /* class atom */
2672 void* instance; /* module instance */
2673 VARARG(name,unicode_str); /* class name */
2674 @REPLY
2675 void* client_ptr; /* pointer to class in client address space */
2676 @END
2679 /* Set some information in a class */
2680 @REQ(set_class_info)
2681 user_handle_t window; /* handle to the window */
2682 unsigned int flags; /* flags for info to set (see below) */
2683 atom_t atom; /* class atom */
2684 unsigned int style; /* class style */
2685 int win_extra; /* number of window extra bytes */
2686 void* instance; /* module instance */
2687 int extra_offset; /* offset to set in extra bytes */
2688 data_size_t extra_size; /* size to set in extra bytes */
2689 lparam_t extra_value; /* value to set in extra bytes */
2690 @REPLY
2691 atom_t old_atom; /* previous class atom */
2692 unsigned int old_style; /* previous class style */
2693 int old_extra; /* previous number of class extra bytes */
2694 int old_win_extra; /* previous number of window extra bytes */
2695 void* old_instance; /* previous module instance */
2696 lparam_t old_extra_value; /* old value in extra bytes */
2697 @END
2698 #define SET_CLASS_ATOM 0x0001
2699 #define SET_CLASS_STYLE 0x0002
2700 #define SET_CLASS_WINEXTRA 0x0004
2701 #define SET_CLASS_INSTANCE 0x0008
2702 #define SET_CLASS_EXTRA 0x0010
2705 /* Set/get clipboard information */
2706 @REQ(set_clipboard_info)
2707 unsigned int flags; /* flags for fields to set (see below) */
2708 user_handle_t clipboard; /* clipboard window */
2709 user_handle_t owner; /* clipboard owner */
2710 user_handle_t viewer; /* first clipboard viewer */
2711 unsigned int seqno; /* change sequence number */
2712 @REPLY
2713 unsigned int flags; /* status flags (see below) */
2714 user_handle_t old_clipboard; /* old clipboard window */
2715 user_handle_t old_owner; /* old clipboard owner */
2716 user_handle_t old_viewer; /* old clipboard viewer */
2717 unsigned int seqno; /* current sequence number */
2718 @END
2720 #define SET_CB_OPEN 0x001
2721 #define SET_CB_OWNER 0x002
2722 #define SET_CB_VIEWER 0x004
2723 #define SET_CB_SEQNO 0x008
2724 #define SET_CB_RELOWNER 0x010
2725 #define SET_CB_CLOSE 0x020
2726 #define CB_OPEN 0x040
2727 #define CB_OWNER 0x080
2728 #define CB_PROCESS 0x100
2731 /* Open a security token */
2732 @REQ(open_token)
2733 obj_handle_t handle; /* handle to the thread or process */
2734 unsigned int access; /* access rights to the new token */
2735 unsigned int attributes;/* object attributes */
2736 unsigned int flags; /* flags (see below) */
2737 @REPLY
2738 obj_handle_t token; /* handle to the token */
2739 @END
2740 #define OPEN_TOKEN_THREAD 1
2741 #define OPEN_TOKEN_AS_SELF 2
2744 /* Set/get the global windows */
2745 @REQ(set_global_windows)
2746 unsigned int flags; /* flags for fields to set (see below) */
2747 user_handle_t shell_window; /* handle to the new shell window */
2748 user_handle_t shell_listview; /* handle to the new shell listview window */
2749 user_handle_t progman_window; /* handle to the new program manager window */
2750 user_handle_t taskman_window; /* handle to the new task manager window */
2751 @REPLY
2752 user_handle_t old_shell_window; /* handle to the shell window */
2753 user_handle_t old_shell_listview; /* handle to the shell listview window */
2754 user_handle_t old_progman_window; /* handle to the new program manager window */
2755 user_handle_t old_taskman_window; /* handle to the new task manager window */
2756 @END
2757 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2758 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2759 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2761 /* Adjust the privileges held by a token */
2762 @REQ(adjust_token_privileges)
2763 obj_handle_t handle; /* handle to the token */
2764 int disable_all; /* disable all privileges? */
2765 int get_modified_state; /* get modified privileges? */
2766 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2767 @REPLY
2768 unsigned int len; /* total length in bytes required to store token privileges */
2769 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2770 @END
2772 /* Retrieves the set of privileges held by or available to a token */
2773 @REQ(get_token_privileges)
2774 obj_handle_t handle; /* handle to the token */
2775 @REPLY
2776 unsigned int len; /* total length in bytes required to store token privileges */
2777 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2778 @END
2780 /* Check the token has the required privileges */
2781 @REQ(check_token_privileges)
2782 obj_handle_t handle; /* handle to the token */
2783 int all_required; /* are all the privileges required for the check to succeed? */
2784 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2785 @REPLY
2786 int has_privileges; /* does the token have the required privileges? */
2787 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2788 @END
2790 @REQ(duplicate_token)
2791 obj_handle_t handle; /* handle to the token to duplicate */
2792 unsigned int access; /* access rights to the new token */
2793 unsigned int attributes; /* object attributes */
2794 int primary; /* is the new token to be a primary one? */
2795 int impersonation_level; /* impersonation level of the new token */
2796 @REPLY
2797 obj_handle_t new_handle; /* duplicated handle */
2798 @END
2800 @REQ(access_check)
2801 obj_handle_t handle; /* handle to the token */
2802 unsigned int desired_access; /* desired access to the object */
2803 unsigned int mapping_read; /* mapping from generic read to specific rights */
2804 unsigned int mapping_write; /* mapping from generic write to specific rights */
2805 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2806 unsigned int mapping_all; /* mapping from generic all to specific rights */
2807 VARARG(sd,security_descriptor); /* security descriptor to check */
2808 @REPLY
2809 unsigned int access_granted; /* access rights actually granted */
2810 unsigned int access_status; /* was access granted? */
2811 unsigned int privileges_len; /* length needed to store privileges */
2812 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2813 @END
2815 @REQ(get_token_user)
2816 obj_handle_t handle; /* handle to the token */
2817 @REPLY
2818 data_size_t user_len; /* length needed to store user */
2819 VARARG(user,SID); /* sid of the user the token represents */
2820 @END
2822 @REQ(get_token_groups)
2823 obj_handle_t handle; /* handle to the token */
2824 @REPLY
2825 data_size_t user_len; /* length needed to store user */
2826 VARARG(user,token_groups); /* groups the token's user belongs to */
2827 @END
2829 @REQ(set_security_object)
2830 obj_handle_t handle; /* handle to the object */
2831 unsigned int security_info; /* which parts of security descriptor to set */
2832 VARARG(sd,security_descriptor); /* security descriptor to set */
2833 @END
2835 @REQ(get_security_object)
2836 obj_handle_t handle; /* handle to the object */
2837 unsigned int security_info; /* which parts of security descriptor to get */
2838 @REPLY
2839 unsigned int sd_len; /* buffer size needed for sd */
2840 VARARG(sd,security_descriptor); /* retrieved security descriptor */
2841 @END
2843 /* Create a mailslot */
2844 @REQ(create_mailslot)
2845 unsigned int access; /* wanted access rights */
2846 unsigned int attributes; /* object attributes */
2847 obj_handle_t rootdir; /* root directory */
2848 unsigned int max_msgsize;
2849 timeout_t read_timeout;
2850 VARARG(name,unicode_str); /* mailslot name */
2851 @REPLY
2852 obj_handle_t handle; /* handle to the mailslot */
2853 @END
2856 /* Set mailslot information */
2857 @REQ(set_mailslot_info)
2858 obj_handle_t handle; /* handle to the mailslot */
2859 unsigned int flags;
2860 timeout_t read_timeout;
2861 @REPLY
2862 unsigned int max_msgsize;
2863 timeout_t read_timeout;
2864 @END
2865 #define MAILSLOT_SET_READ_TIMEOUT 1
2868 /* Create a directory object */
2869 @REQ(create_directory)
2870 unsigned int access; /* access flags */
2871 unsigned int attributes; /* object attributes */
2872 obj_handle_t rootdir; /* root directory */
2873 VARARG(directory_name,unicode_str); /* Directory name */
2874 @REPLY
2875 obj_handle_t handle; /* handle to the directory */
2876 @END
2879 /* Open a directory object */
2880 @REQ(open_directory)
2881 unsigned int access; /* access flags */
2882 unsigned int attributes; /* object attributes */
2883 obj_handle_t rootdir; /* root directory */
2884 VARARG(directory_name,unicode_str); /* Directory name */
2885 @REPLY
2886 obj_handle_t handle; /* handle to the directory */
2887 @END
2890 /* Get a directory entry by index */
2891 @REQ(get_directory_entry)
2892 obj_handle_t handle; /* handle to the directory */
2893 unsigned int index; /* entry index */
2894 @REPLY
2895 data_size_t name_len; /* length of the entry name in bytes */
2896 VARARG(name,unicode_str,name_len); /* entry name */
2897 VARARG(type,unicode_str); /* entry type */
2898 @END
2901 /* Create a symbolic link object */
2902 @REQ(create_symlink)
2903 unsigned int access; /* access flags */
2904 unsigned int attributes; /* object attributes */
2905 obj_handle_t rootdir; /* root directory */
2906 data_size_t name_len; /* length of the symlink name in bytes */
2907 VARARG(name,unicode_str,name_len); /* symlink name */
2908 VARARG(target_name,unicode_str); /* target name */
2909 @REPLY
2910 obj_handle_t handle; /* handle to the symlink */
2911 @END
2914 /* Open a symbolic link object */
2915 @REQ(open_symlink)
2916 unsigned int access; /* access flags */
2917 unsigned int attributes; /* object attributes */
2918 obj_handle_t rootdir; /* root directory */
2919 VARARG(name,unicode_str); /* symlink name */
2920 @REPLY
2921 obj_handle_t handle; /* handle to the symlink */
2922 @END
2925 /* Query a symbolic link object */
2926 @REQ(query_symlink)
2927 obj_handle_t handle; /* handle to the symlink */
2928 @REPLY
2929 VARARG(target_name,unicode_str); /* target name */
2930 @END
2933 /* Query basic object information */
2934 @REQ(get_object_info)
2935 obj_handle_t handle; /* handle to the object */
2936 @REPLY
2937 unsigned int access; /* granted access mask */
2938 unsigned int ref_count; /* object ref count */
2939 @END
2942 /* Unlink a named object */
2943 @REQ(unlink_object)
2944 obj_handle_t handle; /* handle to the object */
2945 @END
2948 /* Query the impersonation level of an impersonation token */
2949 @REQ(get_token_impersonation_level)
2950 obj_handle_t handle; /* handle to the object */
2951 @REPLY
2952 int impersonation_level; /* impersonation level of the impersonation token */
2953 @END
2955 /* Allocate a locally-unique identifier */
2956 @REQ(allocate_locally_unique_id)
2957 @REPLY
2958 luid_t luid;
2959 @END
2962 /* Create a device manager */
2963 @REQ(create_device_manager)
2964 unsigned int access; /* wanted access rights */
2965 unsigned int attributes; /* object attributes */
2966 @REPLY
2967 obj_handle_t handle; /* handle to the device */
2968 @END
2971 /* Create a device */
2972 @REQ(create_device)
2973 unsigned int access; /* wanted access rights */
2974 unsigned int attributes; /* object attributes */
2975 obj_handle_t rootdir; /* root directory */
2976 obj_handle_t manager; /* device manager */
2977 void* user_ptr; /* opaque ptr for use by client */
2978 VARARG(name,unicode_str); /* object name */
2979 @REPLY
2980 obj_handle_t handle; /* handle to the device */
2981 @END
2984 /* Delete a device */
2985 @REQ(delete_device)
2986 obj_handle_t handle; /* handle to the device */
2987 @END
2990 /* Retrieve the next pending device ioctl request */
2991 @REQ(get_next_device_request)
2992 obj_handle_t manager; /* handle to the device manager */
2993 obj_handle_t prev; /* handle to the previous ioctl */
2994 unsigned int status; /* status of the previous ioctl */
2995 VARARG(prev_data,bytes); /* output data of the previous ioctl */
2996 @REPLY
2997 obj_handle_t next; /* handle to the next ioctl */
2998 ioctl_code_t code; /* ioctl code */
2999 void* user_ptr; /* opaque ptr for the device */
3000 data_size_t in_size; /* total needed input size */
3001 data_size_t out_size; /* needed output size */
3002 VARARG(next_data,bytes); /* input data of the next ioctl */
3003 @END
3006 /* Make the current process a system process */
3007 @REQ(make_process_system)
3008 @REPLY
3009 obj_handle_t event; /* event signaled when all user processes have exited */
3010 @END
3013 /* Get detailed fixed-size information about a token */
3014 @REQ(get_token_statistics)
3015 obj_handle_t handle; /* handle to the object */
3016 @REPLY
3017 luid_t token_id; /* locally-unique identifier of the token */
3018 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3019 int primary; /* is the token primary or impersonation? */
3020 int impersonation_level; /* level of impersonation */
3021 int group_count; /* the number of groups the token is a member of */
3022 int privilege_count; /* the number of privileges the token has */
3023 @END
3026 /* Create I/O completion port */
3027 @REQ(create_completion)
3028 unsigned int access; /* desired access to a port */
3029 unsigned int attributes; /* object attributes */
3030 unsigned int concurrent; /* max number of concurrent active threads */
3031 obj_handle_t rootdir; /* root directory */
3032 VARARG(filename,string); /* port name */
3033 @REPLY
3034 obj_handle_t handle; /* port handle */
3035 @END
3038 /* Open I/O completion port */
3039 @REQ(open_completion)
3040 unsigned int access; /* desired access to a port */
3041 unsigned int attributes; /* object attributes */
3042 obj_handle_t rootdir; /* root directory */
3043 VARARG(filename,string); /* port name */
3044 @REPLY
3045 obj_handle_t handle; /* port handle */
3046 @END
3049 /* add completion to completion port */
3050 @REQ(add_completion)
3051 obj_handle_t handle; /* port handle */
3052 apc_param_t ckey; /* completion key */
3053 apc_param_t cvalue; /* completion value */
3054 unsigned int information; /* IO_STATUS_BLOCK Information */
3055 unsigned int status; /* completion result */
3056 @END
3059 /* get completion from completion port queue */
3060 @REQ(remove_completion)
3061 obj_handle_t handle; /* port handle */
3062 @REPLY
3063 apc_param_t ckey; /* completion key */
3064 apc_param_t cvalue; /* completion value */
3065 unsigned int information; /* IO_STATUS_BLOCK Information */
3066 unsigned int status; /* completion result */
3067 @END
3070 /* get completion queue depth */
3071 @REQ(query_completion)
3072 obj_handle_t handle; /* port handle */
3073 @REPLY
3074 unsigned int depth; /* completion queue depth */
3075 @END
3078 /* associate object with completion port */
3079 @REQ(set_completion_info)
3080 obj_handle_t handle; /* object handle */
3081 obj_handle_t chandle; /* port handle */
3082 apc_param_t ckey; /* completion key */
3083 @END
3086 /* check for associated completion and push msg */
3087 @REQ(add_fd_completion)
3088 obj_handle_t handle; /* async' object */
3089 apc_param_t cvalue; /* completion value */
3090 unsigned int status; /* completion status */
3091 unsigned int information; /* IO_STATUS_BLOCK Information */
3092 @END
3095 /* Retrieve layered info for a window */
3096 @REQ(get_window_layered_info)
3097 user_handle_t handle; /* handle to the window */
3098 @REPLY
3099 unsigned int color_key; /* color key */
3100 unsigned int alpha; /* alpha (0..255) */
3101 unsigned int flags; /* LWA_* flags */
3102 @END
3105 /* Set layered info for a window */
3106 @REQ(set_window_layered_info)
3107 user_handle_t handle; /* handle to the window */
3108 unsigned int color_key; /* color key */
3109 unsigned int alpha; /* alpha (0..255) */
3110 unsigned int flags; /* LWA_* flags */
3111 @END