msi: automation: Output FIXMEs for unknown member names.
[wine/wine-kai.git] / server / protocol.def
blobdd59acb9c613a9f60344364e98185ae6e8ffcf89
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef void *obj_handle_t;
35 typedef void *user_handle_t;
36 typedef unsigned short atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
42 struct request_header
44 int req; /* request code */
45 data_size_t request_size; /* request variable part size */
46 data_size_t reply_size; /* reply variable part maximum size */
49 struct reply_header
51 unsigned int error; /* error result */
52 data_size_t reply_size; /* reply variable part size */
55 /* placeholder structure for the maximum allowed request size */
56 /* this is used to construct the generic_request union */
57 struct request_max_size
59 int pad[16]; /* the max request size is 16 ints */
62 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
63 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
66 /* definitions of the event data depending on the event code */
67 struct debug_event_exception
69 EXCEPTION_RECORD record; /* exception record */
70 int first; /* first chance exception? */
72 struct debug_event_create_thread
74 obj_handle_t handle; /* handle to the new thread */
75 void *teb; /* thread teb (in debugged process address space) */
76 void *start; /* thread startup routine */
78 struct debug_event_create_process
80 obj_handle_t file; /* handle to the process exe file */
81 obj_handle_t process; /* handle to the new process */
82 obj_handle_t thread; /* handle to the new thread */
83 void *base; /* base of executable image */
84 int dbg_offset; /* offset of debug info in file */
85 int dbg_size; /* size of debug info */
86 void *teb; /* thread teb (in debugged process address space) */
87 void *start; /* thread startup routine */
88 void *name; /* image name (optional) */
89 int unicode; /* is it Unicode? */
91 struct debug_event_exit
93 int exit_code; /* thread or process exit code */
95 struct debug_event_load_dll
97 obj_handle_t handle; /* file handle for the dll */
98 void *base; /* base address of the dll */
99 int dbg_offset; /* offset of debug info in file */
100 int dbg_size; /* size of debug info */
101 void *name; /* image name (optional) */
102 int unicode; /* is it Unicode? */
104 struct debug_event_unload_dll
106 void *base; /* base address of the dll */
108 struct debug_event_output_string
110 void *string; /* string to display (in debugged process address space) */
111 int unicode; /* is it Unicode? */
112 int length; /* string length */
114 struct debug_event_rip_info
116 int error; /* ??? */
117 int type; /* ??? */
119 union debug_event_data
121 struct debug_event_exception exception;
122 struct debug_event_create_thread create_thread;
123 struct debug_event_create_process create_process;
124 struct debug_event_exit exit;
125 struct debug_event_load_dll load_dll;
126 struct debug_event_unload_dll unload_dll;
127 struct debug_event_output_string output_string;
128 struct debug_event_rip_info rip_info;
131 /* debug event data */
132 typedef struct
134 int code; /* event code */
135 union debug_event_data info; /* event information */
136 } debug_event_t;
138 /* structure used in sending an fd from client to server */
139 struct send_fd
141 thread_id_t tid; /* thread id */
142 int fd; /* file descriptor on client-side */
145 /* structure sent by the server on the wait fifo */
146 struct wake_up_reply
148 void *cookie; /* magic cookie that was passed in select_request */
149 int signaled; /* wait result */
152 /* NT-style timeout, in 100ns units, negative means relative timeout */
153 typedef __int64 timeout_t;
154 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
156 /* structure returned in the list of window properties */
157 typedef struct
159 atom_t atom; /* property atom */
160 short string; /* was atom a string originally? */
161 obj_handle_t handle; /* handle stored in property */
162 } property_data_t;
164 /* structure to specify window rectangles */
165 typedef struct
167 int left;
168 int top;
169 int right;
170 int bottom;
171 } rectangle_t;
173 /* structure for parameters of async I/O calls */
174 typedef struct
176 void *callback; /* client-side callback to call upon end of async */
177 void *iosb; /* I/O status block in client addr space */
178 void *arg; /* opaque user data to pass to callback */
179 void *apc; /* user apc to call */
180 void *apc_arg; /* argument for user apc */
181 obj_handle_t event; /* event to signal when done */
182 } async_data_t;
184 /* structures for extra message data */
186 struct callback_msg_data
188 void *callback; /* callback function */
189 unsigned long data; /* user data for callback */
190 unsigned long result; /* message result */
193 struct winevent_msg_data
195 user_handle_t hook; /* hook handle */
196 thread_id_t tid; /* thread id */
197 void *hook_proc; /* hook proc address */
198 /* followed by module name if any */
201 typedef union
203 unsigned char bytes[1]; /* raw data for sent messages */
204 struct callback_msg_data callback;
205 struct winevent_msg_data winevent;
206 } message_data_t;
208 /* structure for console char/attribute info */
209 typedef struct
211 WCHAR ch;
212 unsigned short attr;
213 } char_info_t;
215 typedef struct
217 unsigned int low_part;
218 int high_part;
219 } luid_t;
221 #define MAX_ACL_LEN 65535
223 struct security_descriptor
225 unsigned int control; /* SE_ flags */
226 data_size_t owner_len;
227 data_size_t group_len;
228 data_size_t sacl_len;
229 data_size_t dacl_len;
230 /* VARARGS(owner,SID); */
231 /* VARARGS(group,SID); */
232 /* VARARGS(sacl,ACL); */
233 /* VARARGS(dacl,ACL); */
236 struct token_groups
238 unsigned int count;
239 /* unsigned int attributes[count]; */
240 /* VARARGS(sids,SID); */
243 enum apc_type
245 APC_NONE,
246 APC_USER,
247 APC_TIMER,
248 APC_ASYNC_IO,
249 APC_VIRTUAL_ALLOC,
250 APC_VIRTUAL_FREE,
251 APC_VIRTUAL_QUERY,
252 APC_VIRTUAL_PROTECT,
253 APC_VIRTUAL_FLUSH,
254 APC_VIRTUAL_LOCK,
255 APC_VIRTUAL_UNLOCK,
256 APC_MAP_VIEW,
257 APC_UNMAP_VIEW,
258 APC_CREATE_THREAD
261 typedef union
263 enum apc_type type;
264 struct
266 enum apc_type type; /* APC_USER */
267 void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
268 unsigned long args[3]; /* arguments for user function */
269 } user;
270 struct
272 enum apc_type type; /* APC_TIMER */
273 void (__stdcall *func)(void*, unsigned int, unsigned int);
274 timeout_t time; /* absolute time of expiration */
275 void *arg; /* user argument */
276 } timer;
277 struct
279 enum apc_type type; /* APC_ASYNC_IO */
280 unsigned int (*func)(void*, void*, unsigned int);
281 void *user; /* user pointer */
282 void *sb; /* status block */
283 unsigned int status; /* I/O status */
284 } async_io;
285 struct
287 enum apc_type type; /* APC_VIRTUAL_ALLOC */
288 void *addr; /* requested address */
289 unsigned long size; /* allocation size */
290 unsigned int zero_bits; /* allocation alignment */
291 unsigned int op_type; /* type of operation */
292 unsigned int prot; /* memory protection flags */
293 } virtual_alloc;
294 struct
296 enum apc_type type; /* APC_VIRTUAL_FREE */
297 void *addr; /* requested address */
298 unsigned long size; /* allocation size */
299 unsigned int op_type; /* type of operation */
300 } virtual_free;
301 struct
303 enum apc_type type; /* APC_VIRTUAL_QUERY */
304 const void *addr; /* requested address */
305 } virtual_query;
306 struct
308 enum apc_type type; /* APC_VIRTUAL_PROTECT */
309 void *addr; /* requested address */
310 unsigned long size; /* requested address */
311 unsigned int prot; /* new protection flags */
312 } virtual_protect;
313 struct
315 enum apc_type type; /* APC_VIRTUAL_FLUSH */
316 const void *addr; /* requested address */
317 unsigned long size; /* requested address */
318 } virtual_flush;
319 struct
321 enum apc_type type; /* APC_VIRTUAL_LOCK */
322 void *addr; /* requested address */
323 unsigned long size; /* requested address */
324 } virtual_lock;
325 struct
327 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
328 void *addr; /* requested address */
329 unsigned long size; /* requested address */
330 } virtual_unlock;
331 struct
333 enum apc_type type; /* APC_MAP_VIEW */
334 obj_handle_t handle; /* mapping handle */
335 void *addr; /* requested address */
336 unsigned long size; /* allocation size */
337 unsigned int offset_low;/* file offset */
338 unsigned int offset_high;
339 unsigned int zero_bits; /* allocation alignment */
340 unsigned int alloc_type;/* allocation type */
341 unsigned int prot; /* memory protection flags */
342 } map_view;
343 struct
345 enum apc_type type; /* APC_UNMAP_VIEW */
346 void *addr; /* view address */
347 } unmap_view;
348 struct
350 enum apc_type type; /* APC_CREATE_THREAD */
351 void (__stdcall *func)(void*); /* start function */
352 void *arg; /* argument for start function */
353 unsigned long reserve; /* reserve size for thread stack */
354 unsigned long commit; /* commit size for thread stack */
355 int suspend; /* suspended thread? */
356 } create_thread;
357 } apc_call_t;
359 typedef union
361 enum apc_type type;
362 struct
364 enum apc_type type; /* APC_ASYNC_IO */
365 unsigned int status; /* new status of async operation */
366 } async_io;
367 struct
369 enum apc_type type; /* APC_VIRTUAL_ALLOC */
370 unsigned int status; /* status returned by call */
371 void *addr; /* resulting address */
372 unsigned long size; /* resulting size */
373 } virtual_alloc;
374 struct
376 enum apc_type type; /* APC_VIRTUAL_FREE */
377 unsigned int status; /* status returned by call */
378 void *addr; /* resulting address */
379 unsigned long size; /* resulting size */
380 } virtual_free;
381 struct
383 enum apc_type type; /* APC_VIRTUAL_QUERY */
384 unsigned int status; /* status returned by call */
385 void *base; /* resulting base address */
386 void *alloc_base;/* resulting allocation base */
387 unsigned long size; /* resulting region size */
388 unsigned int state; /* resulting region state */
389 unsigned int prot; /* resulting region protection */
390 unsigned int alloc_prot;/* resulting allocation protection */
391 unsigned int alloc_type;/* resulting region allocation type */
392 } virtual_query;
393 struct
395 enum apc_type type; /* APC_VIRTUAL_PROTECT */
396 unsigned int status; /* status returned by call */
397 void *addr; /* resulting address */
398 unsigned long size; /* resulting size */
399 unsigned int prot; /* old protection flags */
400 } virtual_protect;
401 struct
403 enum apc_type type; /* APC_VIRTUAL_FLUSH */
404 unsigned int status; /* status returned by call */
405 const void *addr; /* resulting address */
406 unsigned long size; /* resulting size */
407 } virtual_flush;
408 struct
410 enum apc_type type; /* APC_VIRTUAL_LOCK */
411 unsigned int status; /* status returned by call */
412 void *addr; /* resulting address */
413 unsigned long size; /* resulting size */
414 } virtual_lock;
415 struct
417 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
418 unsigned int status; /* status returned by call */
419 void *addr; /* resulting address */
420 unsigned long size; /* resulting size */
421 } virtual_unlock;
422 struct
424 enum apc_type type; /* APC_MAP_VIEW */
425 unsigned int status; /* status returned by call */
426 void *addr; /* resulting address */
427 unsigned long size; /* resulting size */
428 } map_view;
429 struct
431 enum apc_type type; /* APC_MAP_VIEW */
432 unsigned int status; /* status returned by call */
433 } unmap_view;
434 struct
436 enum apc_type type; /* APC_CREATE_THREAD */
437 unsigned int status; /* status returned by call */
438 thread_id_t tid; /* thread id */
439 obj_handle_t handle; /* handle to new thread */
440 } create_thread;
441 } apc_result_t;
443 /****************************************************************/
444 /* Request declarations */
446 /* Create a new process from the context of the parent */
447 @REQ(new_process)
448 int inherit_all; /* inherit all handles from parent */
449 unsigned int create_flags; /* creation flags */
450 int socket_fd; /* file descriptor for process socket */
451 obj_handle_t exe_file; /* file handle for main exe */
452 obj_handle_t hstdin; /* handle for stdin */
453 obj_handle_t hstdout; /* handle for stdout */
454 obj_handle_t hstderr; /* handle for stderr */
455 unsigned int process_access; /* access rights for process object */
456 unsigned int process_attr; /* attributes for process object */
457 unsigned int thread_access; /* access rights for thread object */
458 unsigned int thread_attr; /* attributes for thread object */
459 VARARG(info,startup_info); /* startup information */
460 VARARG(env,unicode_str); /* environment for new process */
461 @REPLY
462 obj_handle_t info; /* new process info handle */
463 process_id_t pid; /* process id */
464 obj_handle_t phandle; /* process handle (in the current process) */
465 thread_id_t tid; /* thread id */
466 obj_handle_t thandle; /* thread handle (in the current process) */
467 @END
470 /* Retrieve information about a newly started process */
471 @REQ(get_new_process_info)
472 obj_handle_t info; /* info handle returned from new_process_request */
473 @REPLY
474 int success; /* did the process start successfully? */
475 int exit_code; /* process exit code if failed */
476 @END
479 /* Create a new thread from the context of the parent */
480 @REQ(new_thread)
481 unsigned int access; /* wanted access rights */
482 unsigned int attributes; /* object attributes */
483 int suspend; /* new thread should be suspended on creation */
484 int request_fd; /* fd for request pipe */
485 @REPLY
486 thread_id_t tid; /* thread id */
487 obj_handle_t handle; /* thread handle (in the current process) */
488 @END
491 /* Retrieve the new process startup info */
492 @REQ(get_startup_info)
493 @REPLY
494 obj_handle_t exe_file; /* file handle for main exe */
495 obj_handle_t hstdin; /* handle for stdin */
496 obj_handle_t hstdout; /* handle for stdout */
497 obj_handle_t hstderr; /* handle for stderr */
498 VARARG(info,startup_info); /* startup information */
499 VARARG(env,unicode_str); /* environment */
500 @END
503 /* Signal the end of the process initialization */
504 @REQ(init_process_done)
505 void* module; /* main module base address */
506 void* entry; /* process entry point */
507 int gui; /* is it a GUI process? */
508 @END
511 /* Initialize a thread; called from the child after fork()/clone() */
512 @REQ(init_thread)
513 int unix_pid; /* Unix pid of new thread */
514 int unix_tid; /* Unix tid of new thread */
515 int debug_level; /* new debug level */
516 void* teb; /* TEB of new thread (in thread address space) */
517 void* peb; /* address of PEB (in thread address space) */
518 void* entry; /* thread entry point (in thread address space) */
519 void* ldt_copy; /* address of LDT copy (in thread address space) */
520 int reply_fd; /* fd for reply pipe */
521 int wait_fd; /* fd for blocking calls pipe */
522 @REPLY
523 process_id_t pid; /* process id of the new thread's process */
524 thread_id_t tid; /* thread id of the new thread */
525 data_size_t info_size; /* total size of startup info */
526 timeout_t server_start; /* server start time */
527 int version; /* protocol version */
528 @END
531 /* Terminate a process */
532 @REQ(terminate_process)
533 obj_handle_t handle; /* process handle to terminate */
534 int exit_code; /* process exit code */
535 @REPLY
536 int self; /* suicide? */
537 @END
540 /* Terminate a thread */
541 @REQ(terminate_thread)
542 obj_handle_t handle; /* thread handle to terminate */
543 int exit_code; /* thread exit code */
544 @REPLY
545 int self; /* suicide? */
546 int last; /* last thread in this process? */
547 @END
550 /* Retrieve information about a process */
551 @REQ(get_process_info)
552 obj_handle_t handle; /* process handle */
553 @REPLY
554 process_id_t pid; /* server process id */
555 process_id_t ppid; /* server process id of parent */
556 int exit_code; /* process exit code */
557 int priority; /* priority class */
558 int affinity; /* process affinity mask */
559 void* peb; /* PEB address in process address space */
560 timeout_t start_time; /* process start time */
561 timeout_t end_time; /* process end time */
562 @END
565 /* Set a process informations */
566 @REQ(set_process_info)
567 obj_handle_t handle; /* process handle */
568 int mask; /* setting mask (see below) */
569 int priority; /* priority class */
570 int affinity; /* affinity mask */
571 @END
572 #define SET_PROCESS_INFO_PRIORITY 0x01
573 #define SET_PROCESS_INFO_AFFINITY 0x02
576 /* Retrieve information about a thread */
577 @REQ(get_thread_info)
578 obj_handle_t handle; /* thread handle */
579 thread_id_t tid_in; /* thread id (optional) */
580 @REPLY
581 process_id_t pid; /* server process id */
582 thread_id_t tid; /* server thread id */
583 void* teb; /* thread teb pointer */
584 int exit_code; /* thread exit code */
585 int priority; /* thread priority level */
586 int affinity; /* thread affinity mask */
587 timeout_t creation_time; /* thread creation time */
588 timeout_t exit_time; /* thread exit time */
589 int last; /* last thread in process */
590 @END
593 /* Set a thread informations */
594 @REQ(set_thread_info)
595 obj_handle_t handle; /* thread handle */
596 int mask; /* setting mask (see below) */
597 int priority; /* priority class */
598 int affinity; /* affinity mask */
599 obj_handle_t token; /* impersonation token */
600 @END
601 #define SET_THREAD_INFO_PRIORITY 0x01
602 #define SET_THREAD_INFO_AFFINITY 0x02
603 #define SET_THREAD_INFO_TOKEN 0x04
606 /* Retrieve information about a module */
607 @REQ(get_dll_info)
608 obj_handle_t handle; /* process handle */
609 void* base_address; /* base address of module */
610 @REPLY
611 size_t size; /* module size */
612 void* entry_point;
613 VARARG(filename,unicode_str); /* file name of module */
614 @END
617 /* Suspend a thread */
618 @REQ(suspend_thread)
619 obj_handle_t handle; /* thread handle */
620 @REPLY
621 int count; /* new suspend count */
622 @END
625 /* Resume a thread */
626 @REQ(resume_thread)
627 obj_handle_t handle; /* thread handle */
628 @REPLY
629 int count; /* new suspend count */
630 @END
633 /* Notify the server that a dll has been loaded */
634 @REQ(load_dll)
635 obj_handle_t handle; /* file handle */
636 void* base; /* base address */
637 size_t size; /* dll size */
638 int dbg_offset; /* debug info offset */
639 int dbg_size; /* debug info size */
640 void* name; /* ptr to ptr to name (in process addr space) */
641 VARARG(filename,unicode_str); /* file name of dll */
642 @END
645 /* Notify the server that a dll is being unloaded */
646 @REQ(unload_dll)
647 void* base; /* base address */
648 @END
651 /* Queue an APC for a thread or process */
652 @REQ(queue_apc)
653 obj_handle_t thread; /* thread handle */
654 obj_handle_t process; /* process handle */
655 apc_call_t call; /* call arguments */
656 @REPLY
657 obj_handle_t handle; /* APC handle */
658 int self; /* run APC in caller itself? */
659 @END
662 /* Get next APC to call */
663 @REQ(get_apc)
664 int alertable; /* is thread alertable? */
665 obj_handle_t prev; /* handle to previous APC */
666 apc_result_t result; /* result of previous APC */
667 @REPLY
668 obj_handle_t handle; /* handle to APC */
669 apc_call_t call; /* call arguments */
670 @END
673 /* Get the result of an APC call */
674 @REQ(get_apc_result)
675 obj_handle_t handle; /* handle to the APC */
676 @REPLY
677 apc_result_t result; /* result of the APC */
678 @END
681 /* Close a handle for the current process */
682 @REQ(close_handle)
683 obj_handle_t handle; /* handle to close */
684 @END
687 /* Set a handle information */
688 @REQ(set_handle_info)
689 obj_handle_t handle; /* handle we are interested in */
690 int flags; /* new handle flags */
691 int mask; /* mask for flags to set */
692 @REPLY
693 int old_flags; /* old flag value */
694 @END
697 /* Duplicate a handle */
698 @REQ(dup_handle)
699 obj_handle_t src_process; /* src process handle */
700 obj_handle_t src_handle; /* src handle to duplicate */
701 obj_handle_t dst_process; /* dst process handle */
702 unsigned int access; /* wanted access rights */
703 unsigned int attributes; /* object attributes */
704 unsigned int options; /* duplicate options (see below) */
705 @REPLY
706 obj_handle_t handle; /* duplicated handle in dst process */
707 int self; /* is the source the current process? */
708 int closed; /* whether the source handle has been closed */
709 @END
710 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
711 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
712 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
715 /* Open a handle to a process */
716 @REQ(open_process)
717 process_id_t pid; /* process id to open */
718 unsigned int access; /* wanted access rights */
719 unsigned int attributes; /* object attributes */
720 @REPLY
721 obj_handle_t handle; /* handle to the process */
722 @END
725 /* Open a handle to a thread */
726 @REQ(open_thread)
727 thread_id_t tid; /* thread id to open */
728 unsigned int access; /* wanted access rights */
729 unsigned int attributes; /* object attributes */
730 @REPLY
731 obj_handle_t handle; /* handle to the thread */
732 @END
735 /* Wait for handles */
736 @REQ(select)
737 int flags; /* wait flags (see below) */
738 void* cookie; /* magic cookie to return to client */
739 obj_handle_t signal; /* object to signal (0 if none) */
740 timeout_t timeout; /* timeout */
741 VARARG(handles,handles); /* handles to select on */
742 @REPLY
743 timeout_t timeout; /* timeout converted to absolute */
744 @END
745 #define SELECT_ALL 1
746 #define SELECT_ALERTABLE 2
747 #define SELECT_INTERRUPTIBLE 4
750 /* Create an event */
751 @REQ(create_event)
752 unsigned int access; /* wanted access rights */
753 unsigned int attributes; /* object attributes */
754 obj_handle_t rootdir; /* root directory */
755 int manual_reset; /* manual reset event */
756 int initial_state; /* initial state of the event */
757 VARARG(name,unicode_str); /* object name */
758 @REPLY
759 obj_handle_t handle; /* handle to the event */
760 @END
762 /* Event operation */
763 @REQ(event_op)
764 obj_handle_t handle; /* handle to event */
765 int op; /* event operation (see below) */
766 @END
767 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
770 /* Open an event */
771 @REQ(open_event)
772 unsigned int access; /* wanted access rights */
773 unsigned int attributes; /* object attributes */
774 obj_handle_t rootdir; /* root directory */
775 VARARG(name,unicode_str); /* object name */
776 @REPLY
777 obj_handle_t handle; /* handle to the event */
778 @END
781 /* Create a mutex */
782 @REQ(create_mutex)
783 unsigned int access; /* wanted access rights */
784 unsigned int attributes; /* object attributes */
785 obj_handle_t rootdir; /* root directory */
786 int owned; /* initially owned? */
787 VARARG(name,unicode_str); /* object name */
788 @REPLY
789 obj_handle_t handle; /* handle to the mutex */
790 @END
793 /* Release a mutex */
794 @REQ(release_mutex)
795 obj_handle_t handle; /* handle to the mutex */
796 @REPLY
797 unsigned int prev_count; /* value of internal counter, before release */
798 @END
801 /* Open a mutex */
802 @REQ(open_mutex)
803 unsigned int access; /* wanted access rights */
804 unsigned int attributes; /* object attributes */
805 obj_handle_t rootdir; /* root directory */
806 VARARG(name,unicode_str); /* object name */
807 @REPLY
808 obj_handle_t handle; /* handle to the mutex */
809 @END
812 /* Create a semaphore */
813 @REQ(create_semaphore)
814 unsigned int access; /* wanted access rights */
815 unsigned int attributes; /* object attributes */
816 obj_handle_t rootdir; /* root directory */
817 unsigned int initial; /* initial count */
818 unsigned int max; /* maximum count */
819 VARARG(name,unicode_str); /* object name */
820 @REPLY
821 obj_handle_t handle; /* handle to the semaphore */
822 @END
825 /* Release a semaphore */
826 @REQ(release_semaphore)
827 obj_handle_t handle; /* handle to the semaphore */
828 unsigned int count; /* count to add to semaphore */
829 @REPLY
830 unsigned int prev_count; /* previous semaphore count */
831 @END
834 /* Open a semaphore */
835 @REQ(open_semaphore)
836 unsigned int access; /* wanted access rights */
837 unsigned int attributes; /* object attributes */
838 obj_handle_t rootdir; /* root directory */
839 VARARG(name,unicode_str); /* object name */
840 @REPLY
841 obj_handle_t handle; /* handle to the semaphore */
842 @END
845 /* Create a file */
846 @REQ(create_file)
847 unsigned int access; /* wanted access rights */
848 unsigned int attributes; /* object attributes */
849 unsigned int sharing; /* sharing flags */
850 int create; /* file create action */
851 unsigned int options; /* file options */
852 unsigned int attrs; /* file attributes for creation */
853 VARARG(filename,string); /* file name */
854 @REPLY
855 obj_handle_t handle; /* handle to the file */
856 @END
859 /* Open a file object */
860 @REQ(open_file_object)
861 unsigned int access; /* wanted access rights */
862 unsigned int attributes; /* open attributes */
863 obj_handle_t rootdir; /* root directory */
864 unsigned int sharing; /* sharing flags */
865 unsigned int options; /* file options */
866 VARARG(filename,unicode_str); /* file name */
867 @REPLY
868 obj_handle_t handle; /* handle to the file */
869 @END
872 /* Allocate a file handle for a Unix fd */
873 @REQ(alloc_file_handle)
874 unsigned int access; /* wanted access rights */
875 unsigned int attributes; /* object attributes */
876 int fd; /* file descriptor on the client side */
877 @REPLY
878 obj_handle_t handle; /* handle to the file */
879 @END
882 /* Get a Unix fd to access a file */
883 @REQ(get_handle_fd)
884 obj_handle_t handle; /* handle to the file */
885 @REPLY
886 int type; /* file type (see below) */
887 int removable; /* is file removable? */
888 unsigned int access; /* file access rights */
889 unsigned int options; /* file open options */
890 @END
891 enum server_fd_type
893 FD_TYPE_INVALID, /* invalid file (no associated fd) */
894 FD_TYPE_FILE, /* regular file */
895 FD_TYPE_DIR, /* directory */
896 FD_TYPE_SOCKET, /* socket */
897 FD_TYPE_SERIAL, /* serial port */
898 FD_TYPE_PIPE, /* named pipe */
899 FD_TYPE_MAILSLOT, /* mailslot */
900 FD_TYPE_CHAR, /* unspecified char device */
901 FD_TYPE_DEVICE, /* Windows device file */
902 FD_TYPE_NB_TYPES
906 /* Flush a file buffers */
907 @REQ(flush_file)
908 obj_handle_t handle; /* handle to the file */
909 @REPLY
910 obj_handle_t event; /* event set when finished */
911 @END
914 /* Lock a region of a file */
915 @REQ(lock_file)
916 obj_handle_t handle; /* handle to the file */
917 unsigned int offset_low; /* offset of start of lock */
918 unsigned int offset_high; /* offset of start of lock */
919 unsigned int count_low; /* count of bytes to lock */
920 unsigned int count_high; /* count of bytes to lock */
921 int shared; /* shared or exclusive lock? */
922 int wait; /* do we want to wait? */
923 @REPLY
924 obj_handle_t handle; /* handle to wait on */
925 int overlapped; /* is it an overlapped I/O handle? */
926 @END
929 /* Unlock a region of a file */
930 @REQ(unlock_file)
931 obj_handle_t handle; /* handle to the file */
932 unsigned int offset_low; /* offset of start of unlock */
933 unsigned int offset_high; /* offset of start of unlock */
934 unsigned int count_low; /* count of bytes to unlock */
935 unsigned int count_high; /* count of bytes to unlock */
936 @END
939 /* Create a socket */
940 @REQ(create_socket)
941 unsigned int access; /* wanted access rights */
942 unsigned int attributes; /* object attributes */
943 int family; /* family, see socket manpage */
944 int type; /* type, see socket manpage */
945 int protocol; /* protocol, see socket manpage */
946 unsigned int flags; /* socket flags */
947 @REPLY
948 obj_handle_t handle; /* handle to the new socket */
949 @END
952 /* Accept a socket */
953 @REQ(accept_socket)
954 obj_handle_t lhandle; /* handle to the listening socket */
955 unsigned int access; /* wanted access rights */
956 unsigned int attributes; /* object attributes */
957 @REPLY
958 obj_handle_t handle; /* handle to the new socket */
959 @END
962 /* Set socket event parameters */
963 @REQ(set_socket_event)
964 obj_handle_t handle; /* handle to the socket */
965 unsigned int mask; /* event mask */
966 obj_handle_t event; /* event object */
967 user_handle_t window; /* window to send the message to */
968 unsigned int msg; /* message to send */
969 @END
972 /* Get socket event parameters */
973 @REQ(get_socket_event)
974 obj_handle_t handle; /* handle to the socket */
975 int service; /* clear pending? */
976 obj_handle_t c_event; /* event to clear */
977 @REPLY
978 unsigned int mask; /* event mask */
979 unsigned int pmask; /* pending events */
980 unsigned int state; /* status bits */
981 VARARG(errors,ints); /* event errors */
982 @END
985 /* Reenable pending socket events */
986 @REQ(enable_socket_event)
987 obj_handle_t handle; /* handle to the socket */
988 unsigned int mask; /* events to re-enable */
989 unsigned int sstate; /* status bits to set */
990 unsigned int cstate; /* status bits to clear */
991 @END
993 @REQ(set_socket_deferred)
994 obj_handle_t handle; /* handle to the socket */
995 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
996 @END
998 /* Allocate a console (only used by a console renderer) */
999 @REQ(alloc_console)
1000 unsigned int access; /* wanted access rights */
1001 unsigned int attributes; /* object attributes */
1002 process_id_t pid; /* pid of process which shall be attached to the console */
1003 @REPLY
1004 obj_handle_t handle_in; /* handle to console input */
1005 obj_handle_t event; /* handle to renderer events change notification */
1006 @END
1009 /* Free the console of the current process */
1010 @REQ(free_console)
1011 @END
1014 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1015 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1016 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1017 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1018 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1019 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1020 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1021 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1022 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1023 struct console_renderer_event
1025 short event;
1026 union
1028 struct update
1030 short top;
1031 short bottom;
1032 } update;
1033 struct resize
1035 short width;
1036 short height;
1037 } resize;
1038 struct cursor_pos
1040 short x;
1041 short y;
1042 } cursor_pos;
1043 struct cursor_geom
1045 short visible;
1046 short size;
1047 } cursor_geom;
1048 struct display
1050 short left;
1051 short top;
1052 short width;
1053 short height;
1054 } display;
1055 } u;
1058 /* retrieve console events for the renderer */
1059 @REQ(get_console_renderer_events)
1060 obj_handle_t handle; /* handle to console input events */
1061 @REPLY
1062 VARARG(data,bytes); /* the various console_renderer_events */
1063 @END
1066 /* Open a handle to the process console */
1067 @REQ(open_console)
1068 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1069 /* otherwise console_in handle to get active screen buffer? */
1070 unsigned int access; /* wanted access rights */
1071 unsigned int attributes; /* object attributes */
1072 int share; /* share mask (only for output handles) */
1073 @REPLY
1074 obj_handle_t handle; /* handle to the console */
1075 @END
1078 /* Get the input queue wait event */
1079 @REQ(get_console_wait_event)
1080 @REPLY
1081 obj_handle_t handle;
1082 @END
1084 /* Get a console mode (input or output) */
1085 @REQ(get_console_mode)
1086 obj_handle_t handle; /* handle to the console */
1087 @REPLY
1088 int mode; /* console mode */
1089 @END
1092 /* Set a console mode (input or output) */
1093 @REQ(set_console_mode)
1094 obj_handle_t handle; /* handle to the console */
1095 int mode; /* console mode */
1096 @END
1099 /* Set info about a console (input only) */
1100 @REQ(set_console_input_info)
1101 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1102 int mask; /* setting mask (see below) */
1103 obj_handle_t active_sb; /* active screen buffer */
1104 int history_mode; /* whether we duplicate lines in history */
1105 int history_size; /* number of lines in history */
1106 int edition_mode; /* index to the edition mode flavors */
1107 VARARG(title,unicode_str); /* console title */
1108 @END
1109 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1110 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1111 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1112 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1113 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1116 /* Get info about a console (input only) */
1117 @REQ(get_console_input_info)
1118 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1119 @REPLY
1120 int history_mode; /* whether we duplicate lines in history */
1121 int history_size; /* number of lines in history */
1122 int history_index; /* number of used lines in history */
1123 int edition_mode; /* index to the edition mode flavors */
1124 VARARG(title,unicode_str); /* console title */
1125 @END
1128 /* appends a string to console's history */
1129 @REQ(append_console_input_history)
1130 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1131 VARARG(line,unicode_str); /* line to add */
1132 @END
1135 /* appends a string to console's history */
1136 @REQ(get_console_input_history)
1137 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1138 int index; /* index to get line from */
1139 @REPLY
1140 int total; /* total length of line in Unicode chars */
1141 VARARG(line,unicode_str); /* line to add */
1142 @END
1145 /* creates a new screen buffer on process' console */
1146 @REQ(create_console_output)
1147 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1148 unsigned int access; /* wanted access rights */
1149 unsigned int attributes; /* object attributes */
1150 unsigned int share; /* sharing credentials */
1151 @REPLY
1152 obj_handle_t handle_out; /* handle to the screen buffer */
1153 @END
1156 /* Set info about a console (output only) */
1157 @REQ(set_console_output_info)
1158 obj_handle_t handle; /* handle to the console */
1159 int mask; /* setting mask (see below) */
1160 short int cursor_size; /* size of cursor (percentage filled) */
1161 short int cursor_visible;/* cursor visibility flag */
1162 short int cursor_x; /* position of cursor (x, y) */
1163 short int cursor_y;
1164 short int width; /* width of the screen buffer */
1165 short int height; /* height of the screen buffer */
1166 short int attr; /* default attribute */
1167 short int win_left; /* window actually displayed by renderer */
1168 short int win_top; /* the rect area is expressed withing the */
1169 short int win_right; /* boundaries of the screen buffer */
1170 short int win_bottom;
1171 short int max_width; /* maximum size (width x height) for the window */
1172 short int max_height;
1173 @END
1174 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1175 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1176 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1177 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1178 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1179 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1182 /* Get info about a console (output only) */
1183 @REQ(get_console_output_info)
1184 obj_handle_t handle; /* handle to the console */
1185 @REPLY
1186 short int cursor_size; /* size of cursor (percentage filled) */
1187 short int cursor_visible;/* cursor visibility flag */
1188 short int cursor_x; /* position of cursor (x, y) */
1189 short int cursor_y;
1190 short int width; /* width of the screen buffer */
1191 short int height; /* height of the screen buffer */
1192 short int attr; /* default attribute */
1193 short int win_left; /* window actually displayed by renderer */
1194 short int win_top; /* the rect area is expressed withing the */
1195 short int win_right; /* boundaries of the screen buffer */
1196 short int win_bottom;
1197 short int max_width; /* maximum size (width x height) for the window */
1198 short int max_height;
1199 @END
1201 /* Add input records to a console input queue */
1202 @REQ(write_console_input)
1203 obj_handle_t handle; /* handle to the console input */
1204 VARARG(rec,input_records); /* input records */
1205 @REPLY
1206 int written; /* number of records written */
1207 @END
1210 /* Fetch input records from a console input queue */
1211 @REQ(read_console_input)
1212 obj_handle_t handle; /* handle to the console input */
1213 int flush; /* flush the retrieved records from the queue? */
1214 @REPLY
1215 int read; /* number of records read */
1216 VARARG(rec,input_records); /* input records */
1217 @END
1220 /* write data (chars and/or attributes) in a screen buffer */
1221 @REQ(write_console_output)
1222 obj_handle_t handle; /* handle to the console output */
1223 int x; /* position where to start writing */
1224 int y;
1225 int mode; /* char info (see below) */
1226 int wrap; /* wrap around at end of line? */
1227 VARARG(data,bytes); /* info to write */
1228 @REPLY
1229 int written; /* number of char infos actually written */
1230 int width; /* width of screen buffer */
1231 int height; /* height of screen buffer */
1232 @END
1233 enum char_info_mode
1235 CHAR_INFO_MODE_TEXT, /* characters only */
1236 CHAR_INFO_MODE_ATTR, /* attributes only */
1237 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1238 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1242 /* fill a screen buffer with constant data (chars and/or attributes) */
1243 @REQ(fill_console_output)
1244 obj_handle_t handle; /* handle to the console output */
1245 int x; /* position where to start writing */
1246 int y;
1247 int mode; /* char info mode */
1248 int count; /* number to write */
1249 int wrap; /* wrap around at end of line? */
1250 char_info_t data; /* data to write */
1251 @REPLY
1252 int written; /* number of char infos actually written */
1253 @END
1256 /* read data (chars and/or attributes) from a screen buffer */
1257 @REQ(read_console_output)
1258 obj_handle_t handle; /* handle to the console output */
1259 int x; /* position (x,y) where to start reading */
1260 int y;
1261 int mode; /* char info mode */
1262 int wrap; /* wrap around at end of line? */
1263 @REPLY
1264 int width; /* width of screen buffer */
1265 int height; /* height of screen buffer */
1266 VARARG(data,bytes);
1267 @END
1270 /* move a rect (of data) in screen buffer content */
1271 @REQ(move_console_output)
1272 obj_handle_t handle; /* handle to the console output */
1273 short int x_src; /* position (x, y) of rect to start moving from */
1274 short int y_src;
1275 short int x_dst; /* position (x, y) of rect to move to */
1276 short int y_dst;
1277 short int w; /* size of the rect (width, height) to move */
1278 short int h;
1279 @END
1282 /* Sends a signal to a process group */
1283 @REQ(send_console_signal)
1284 int signal; /* the signal to send */
1285 process_id_t group_id; /* the group to send the signal to */
1286 @END
1289 /* enable directory change notifications */
1290 @REQ(read_directory_changes)
1291 unsigned int filter; /* notification filter */
1292 obj_handle_t handle; /* handle to the directory */
1293 int subtree; /* watch the subtree? */
1294 int want_data; /* flag indicating whether change data should be collected */
1295 async_data_t async; /* async I/O parameters */
1296 @END
1299 @REQ(read_change)
1300 obj_handle_t handle;
1301 @REPLY
1302 int action; /* type of change */
1303 VARARG(name,string); /* name of directory entry that changed */
1304 @END
1307 /* Create a file mapping */
1308 @REQ(create_mapping)
1309 unsigned int access; /* wanted access rights */
1310 unsigned int attributes; /* object attributes */
1311 obj_handle_t rootdir; /* root directory */
1312 int size_high; /* mapping size */
1313 int size_low; /* mapping size */
1314 int protect; /* protection flags (see below) */
1315 obj_handle_t file_handle; /* file handle */
1316 VARARG(name,unicode_str); /* object name */
1317 @REPLY
1318 obj_handle_t handle; /* handle to the mapping */
1319 @END
1320 /* protection flags */
1321 #define VPROT_READ 0x01
1322 #define VPROT_WRITE 0x02
1323 #define VPROT_EXEC 0x04
1324 #define VPROT_WRITECOPY 0x08
1325 #define VPROT_GUARD 0x10
1326 #define VPROT_NOCACHE 0x20
1327 #define VPROT_COMMITTED 0x40
1328 #define VPROT_IMAGE 0x80
1331 /* Open a mapping */
1332 @REQ(open_mapping)
1333 unsigned int access; /* wanted access rights */
1334 unsigned int attributes; /* object attributes */
1335 obj_handle_t rootdir; /* root directory */
1336 VARARG(name,unicode_str); /* object name */
1337 @REPLY
1338 obj_handle_t handle; /* handle to the mapping */
1339 @END
1342 /* Get information about a file mapping */
1343 @REQ(get_mapping_info)
1344 obj_handle_t handle; /* handle to the mapping */
1345 @REPLY
1346 int size_high; /* mapping size */
1347 int size_low; /* mapping size */
1348 int protect; /* protection flags */
1349 int header_size; /* header size (for VPROT_IMAGE mapping) */
1350 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1351 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1352 obj_handle_t shared_file; /* shared mapping file handle */
1353 int shared_size; /* shared mapping size */
1354 @END
1357 #define SNAP_HEAPLIST 0x00000001
1358 #define SNAP_PROCESS 0x00000002
1359 #define SNAP_THREAD 0x00000004
1360 #define SNAP_MODULE 0x00000008
1361 /* Create a snapshot */
1362 @REQ(create_snapshot)
1363 unsigned int attributes; /* object attributes */
1364 int flags; /* snapshot flags (SNAP_*) */
1365 process_id_t pid; /* process id */
1366 @REPLY
1367 obj_handle_t handle; /* handle to the snapshot */
1368 @END
1371 /* Get the next process from a snapshot */
1372 @REQ(next_process)
1373 obj_handle_t handle; /* handle to the snapshot */
1374 int reset; /* reset snapshot position? */
1375 @REPLY
1376 int count; /* process usage count */
1377 process_id_t pid; /* process id */
1378 process_id_t ppid; /* parent process id */
1379 void* heap; /* heap base */
1380 void* module; /* main module */
1381 int threads; /* number of threads */
1382 int priority; /* process priority */
1383 int handles; /* number of handles */
1384 VARARG(filename,unicode_str); /* file name of main exe */
1385 @END
1388 /* Get the next thread from a snapshot */
1389 @REQ(next_thread)
1390 obj_handle_t handle; /* handle to the snapshot */
1391 int reset; /* reset snapshot position? */
1392 @REPLY
1393 int count; /* thread usage count */
1394 process_id_t pid; /* process id */
1395 thread_id_t tid; /* thread id */
1396 int base_pri; /* base priority */
1397 int delta_pri; /* delta priority */
1398 @END
1401 /* Get the next module from a snapshot */
1402 @REQ(next_module)
1403 obj_handle_t handle; /* handle to the snapshot */
1404 int reset; /* reset snapshot position? */
1405 @REPLY
1406 process_id_t pid; /* process id */
1407 void* base; /* module base address */
1408 size_t size; /* module size */
1409 VARARG(filename,unicode_str); /* file name of module */
1410 @END
1413 /* Wait for a debug event */
1414 @REQ(wait_debug_event)
1415 int get_handle; /* should we alloc a handle for waiting? */
1416 @REPLY
1417 process_id_t pid; /* process id */
1418 thread_id_t tid; /* thread id */
1419 obj_handle_t wait; /* wait handle if no event ready */
1420 VARARG(event,debug_event); /* debug event data */
1421 @END
1424 /* Queue an exception event */
1425 @REQ(queue_exception_event)
1426 int first; /* first chance exception? */
1427 VARARG(record,exc_event); /* thread context followed by exception record */
1428 @REPLY
1429 obj_handle_t handle; /* handle to the queued event */
1430 @END
1433 /* Retrieve the status of an exception event */
1434 @REQ(get_exception_status)
1435 obj_handle_t handle; /* handle to the queued event */
1436 @REPLY
1437 VARARG(context,context); /* modified thread context */
1438 @END
1441 /* Send an output string to the debugger */
1442 @REQ(output_debug_string)
1443 void* string; /* string to display (in debugged process address space) */
1444 int unicode; /* is it Unicode? */
1445 int length; /* string length */
1446 @END
1449 /* Continue a debug event */
1450 @REQ(continue_debug_event)
1451 process_id_t pid; /* process id to continue */
1452 thread_id_t tid; /* thread id to continue */
1453 int status; /* continuation status */
1454 @END
1457 /* Start/stop debugging an existing process */
1458 @REQ(debug_process)
1459 process_id_t pid; /* id of the process to debug */
1460 int attach; /* 1=attaching / 0=detaching from the process */
1461 @END
1464 /* Simulate a breakpoint in a process */
1465 @REQ(debug_break)
1466 obj_handle_t handle; /* process handle */
1467 @REPLY
1468 int self; /* was it the caller itself? */
1469 @END
1472 /* Set debugger kill on exit flag */
1473 @REQ(set_debugger_kill_on_exit)
1474 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1475 @END
1478 /* Read data from a process address space */
1479 @REQ(read_process_memory)
1480 obj_handle_t handle; /* process handle */
1481 void* addr; /* addr to read from */
1482 @REPLY
1483 VARARG(data,bytes); /* result data */
1484 @END
1487 /* Write data to a process address space */
1488 @REQ(write_process_memory)
1489 obj_handle_t handle; /* process handle */
1490 void* addr; /* addr to write to */
1491 VARARG(data,bytes); /* data to write */
1492 @END
1495 /* Create a registry key */
1496 @REQ(create_key)
1497 obj_handle_t parent; /* handle to the parent key */
1498 unsigned int access; /* desired access rights */
1499 unsigned int attributes; /* object attributes */
1500 unsigned int options; /* creation options */
1501 time_t modif; /* last modification time */
1502 data_size_t namelen; /* length of key name in bytes */
1503 VARARG(name,unicode_str,namelen); /* key name */
1504 VARARG(class,unicode_str); /* class name */
1505 @REPLY
1506 obj_handle_t hkey; /* handle to the created key */
1507 int created; /* has it been newly created? */
1508 @END
1510 /* Open a registry key */
1511 @REQ(open_key)
1512 obj_handle_t parent; /* handle to the parent key */
1513 unsigned int access; /* desired access rights */
1514 unsigned int attributes; /* object attributes */
1515 VARARG(name,unicode_str); /* key name */
1516 @REPLY
1517 obj_handle_t hkey; /* handle to the open key */
1518 @END
1521 /* Delete a registry key */
1522 @REQ(delete_key)
1523 obj_handle_t hkey; /* handle to the key */
1524 @END
1527 /* Flush a registry key */
1528 @REQ(flush_key)
1529 obj_handle_t hkey; /* handle to the key */
1530 @END
1533 /* Enumerate registry subkeys */
1534 @REQ(enum_key)
1535 obj_handle_t hkey; /* handle to registry key */
1536 int index; /* index of subkey (or -1 for current key) */
1537 int info_class; /* requested information class */
1538 @REPLY
1539 int subkeys; /* number of subkeys */
1540 int max_subkey; /* longest subkey name */
1541 int max_class; /* longest class name */
1542 int values; /* number of values */
1543 int max_value; /* longest value name */
1544 int max_data; /* longest value data */
1545 time_t modif; /* last modification time */
1546 data_size_t total; /* total length needed for full name and class */
1547 data_size_t namelen; /* length of key name in bytes */
1548 VARARG(name,unicode_str,namelen); /* key name */
1549 VARARG(class,unicode_str); /* class name */
1550 @END
1553 /* Set a value of a registry key */
1554 @REQ(set_key_value)
1555 obj_handle_t hkey; /* handle to registry key */
1556 int type; /* value type */
1557 data_size_t namelen; /* length of value name in bytes */
1558 VARARG(name,unicode_str,namelen); /* value name */
1559 VARARG(data,bytes); /* value data */
1560 @END
1563 /* Retrieve the value of a registry key */
1564 @REQ(get_key_value)
1565 obj_handle_t hkey; /* handle to registry key */
1566 VARARG(name,unicode_str); /* value name */
1567 @REPLY
1568 int type; /* value type */
1569 data_size_t total; /* total length needed for data */
1570 VARARG(data,bytes); /* value data */
1571 @END
1574 /* Enumerate a value of a registry key */
1575 @REQ(enum_key_value)
1576 obj_handle_t hkey; /* handle to registry key */
1577 int index; /* value index */
1578 int info_class; /* requested information class */
1579 @REPLY
1580 int type; /* value type */
1581 data_size_t total; /* total length needed for full name and data */
1582 data_size_t namelen; /* length of value name in bytes */
1583 VARARG(name,unicode_str,namelen); /* value name */
1584 VARARG(data,bytes); /* value data */
1585 @END
1588 /* Delete a value of a registry key */
1589 @REQ(delete_key_value)
1590 obj_handle_t hkey; /* handle to registry key */
1591 VARARG(name,unicode_str); /* value name */
1592 @END
1595 /* Load a registry branch from a file */
1596 @REQ(load_registry)
1597 obj_handle_t hkey; /* root key to load to */
1598 obj_handle_t file; /* file to load from */
1599 VARARG(name,unicode_str); /* subkey name */
1600 @END
1603 /* UnLoad a registry branch from a file */
1604 @REQ(unload_registry)
1605 obj_handle_t hkey; /* root key to unload to */
1606 @END
1609 /* Save a registry branch to a file */
1610 @REQ(save_registry)
1611 obj_handle_t hkey; /* key to save */
1612 obj_handle_t file; /* file to save to */
1613 @END
1616 /* Add a registry key change notification */
1617 @REQ(set_registry_notification)
1618 obj_handle_t hkey; /* key to watch for changes */
1619 obj_handle_t event; /* event to set */
1620 int subtree; /* should we watch the whole subtree? */
1621 unsigned int filter; /* things to watch */
1622 @END
1625 /* Create a waitable timer */
1626 @REQ(create_timer)
1627 unsigned int access; /* wanted access rights */
1628 unsigned int attributes; /* object attributes */
1629 obj_handle_t rootdir; /* root directory */
1630 int manual; /* manual reset */
1631 VARARG(name,unicode_str); /* object name */
1632 @REPLY
1633 obj_handle_t handle; /* handle to the timer */
1634 @END
1637 /* Open a waitable timer */
1638 @REQ(open_timer)
1639 unsigned int access; /* wanted access rights */
1640 unsigned int attributes; /* object attributes */
1641 obj_handle_t rootdir; /* root directory */
1642 VARARG(name,unicode_str); /* object name */
1643 @REPLY
1644 obj_handle_t handle; /* handle to the timer */
1645 @END
1647 /* Set a waitable timer */
1648 @REQ(set_timer)
1649 obj_handle_t handle; /* handle to the timer */
1650 timeout_t expire; /* next expiration absolute time */
1651 int period; /* timer period in ms */
1652 void* callback; /* callback function */
1653 void* arg; /* callback argument */
1654 @REPLY
1655 int signaled; /* was the timer signaled before this call ? */
1656 @END
1658 /* Cancel a waitable timer */
1659 @REQ(cancel_timer)
1660 obj_handle_t handle; /* handle to the timer */
1661 @REPLY
1662 int signaled; /* was the timer signaled before this calltime ? */
1663 @END
1665 /* Get information on a waitable timer */
1666 @REQ(get_timer_info)
1667 obj_handle_t handle; /* handle to the timer */
1668 @REPLY
1669 timeout_t when; /* absolute time when the timer next expires */
1670 int signaled; /* is the timer signaled? */
1671 @END
1674 /* Retrieve the current context of a thread */
1675 @REQ(get_thread_context)
1676 obj_handle_t handle; /* thread handle */
1677 unsigned int flags; /* context flags */
1678 int suspend; /* if getting context during suspend */
1679 @REPLY
1680 int self; /* was it a handle to the current thread? */
1681 VARARG(context,context); /* thread context */
1682 @END
1685 /* Set the current context of a thread */
1686 @REQ(set_thread_context)
1687 obj_handle_t handle; /* thread handle */
1688 unsigned int flags; /* context flags */
1689 int suspend; /* if setting context during suspend */
1690 VARARG(context,context); /* thread context */
1691 @REPLY
1692 int self; /* was it a handle to the current thread? */
1693 @END
1696 /* Fetch a selector entry for a thread */
1697 @REQ(get_selector_entry)
1698 obj_handle_t handle; /* thread handle */
1699 int entry; /* LDT entry */
1700 @REPLY
1701 unsigned int base; /* selector base */
1702 unsigned int limit; /* selector limit */
1703 unsigned char flags; /* selector flags */
1704 @END
1707 /* Add an atom */
1708 @REQ(add_atom)
1709 obj_handle_t table; /* which table to add atom to */
1710 VARARG(name,unicode_str); /* atom name */
1711 @REPLY
1712 atom_t atom; /* resulting atom */
1713 @END
1716 /* Delete an atom */
1717 @REQ(delete_atom)
1718 obj_handle_t table; /* which table to delete atom from */
1719 atom_t atom; /* atom handle */
1720 @END
1723 /* Find an atom */
1724 @REQ(find_atom)
1725 obj_handle_t table; /* which table to find atom from */
1726 VARARG(name,unicode_str); /* atom name */
1727 @REPLY
1728 atom_t atom; /* atom handle */
1729 @END
1732 /* Get information about an atom */
1733 @REQ(get_atom_information)
1734 obj_handle_t table; /* which table to find atom from */
1735 atom_t atom; /* atom handle */
1736 @REPLY
1737 int count; /* atom lock count */
1738 int pinned; /* whether the atom has been pinned */
1739 data_size_t total; /* actual length of atom name */
1740 VARARG(name,unicode_str); /* atom name */
1741 @END
1744 /* Set information about an atom */
1745 @REQ(set_atom_information)
1746 obj_handle_t table; /* which table to find atom from */
1747 atom_t atom; /* atom handle */
1748 int pinned; /* whether to bump atom information */
1749 @END
1752 /* Empty an atom table */
1753 @REQ(empty_atom_table)
1754 obj_handle_t table; /* which table to find atom from */
1755 int if_pinned; /* whether to delete pinned atoms */
1756 @END
1759 /* Init an atom table */
1760 @REQ(init_atom_table)
1761 int entries; /* number of entries (only for local) */
1762 @REPLY
1763 obj_handle_t table; /* handle to the atom table */
1764 @END
1767 /* Get the message queue of the current thread */
1768 @REQ(get_msg_queue)
1769 @REPLY
1770 obj_handle_t handle; /* handle to the queue */
1771 @END
1774 /* Set the file descriptor associated to the current thread queue */
1775 @REQ(set_queue_fd)
1776 obj_handle_t handle; /* handle to the file descriptor */
1777 @END
1780 /* Set the current message queue wakeup mask */
1781 @REQ(set_queue_mask)
1782 unsigned int wake_mask; /* wakeup bits mask */
1783 unsigned int changed_mask; /* changed bits mask */
1784 int skip_wait; /* will we skip waiting if signaled? */
1785 @REPLY
1786 unsigned int wake_bits; /* current wake bits */
1787 unsigned int changed_bits; /* current changed bits */
1788 @END
1791 /* Get the current message queue status */
1792 @REQ(get_queue_status)
1793 int clear; /* should we clear the change bits? */
1794 @REPLY
1795 unsigned int wake_bits; /* wake bits */
1796 unsigned int changed_bits; /* changed bits since last time */
1797 @END
1800 /* Retrieve the process idle event */
1801 @REQ(get_process_idle_event)
1802 obj_handle_t handle; /* process handle */
1803 @REPLY
1804 obj_handle_t event; /* handle to idle event */
1805 @END
1808 /* Send a message to a thread queue */
1809 @REQ(send_message)
1810 thread_id_t id; /* thread id */
1811 int type; /* message type (see below) */
1812 int flags; /* message flags (see below) */
1813 user_handle_t win; /* window handle */
1814 unsigned int msg; /* message code */
1815 unsigned long wparam; /* parameters */
1816 unsigned long lparam; /* parameters */
1817 timeout_t timeout; /* timeout for reply */
1818 VARARG(data,message_data); /* message data for sent messages */
1819 @END
1821 @REQ(post_quit_message)
1822 int exit_code; /* exit code to return */
1823 @END
1825 enum message_type
1827 MSG_ASCII, /* Ascii message (from SendMessageA) */
1828 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1829 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1830 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1831 MSG_CALLBACK_RESULT,/* result of a callback message */
1832 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1833 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1834 MSG_HARDWARE, /* hardware message */
1835 MSG_WINEVENT /* winevent message */
1837 #define SEND_MSG_ABORT_IF_HUNG 0x01
1840 /* Send a hardware message to a thread queue */
1841 @REQ(send_hardware_message)
1842 thread_id_t id; /* thread id */
1843 user_handle_t win; /* window handle */
1844 unsigned int msg; /* message code */
1845 unsigned int time; /* message time */
1846 unsigned long wparam; /* parameters */
1847 unsigned long lparam; /* parameters */
1848 unsigned long info; /* extra info */
1849 int x; /* x position */
1850 int y; /* y position */
1851 @END
1854 /* Get a message from the current queue */
1855 @REQ(get_message)
1856 unsigned int flags; /* PM_* flags */
1857 user_handle_t get_win; /* window handle to get */
1858 unsigned int get_first; /* first message code to get */
1859 unsigned int get_last; /* last message code to get */
1860 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1861 @REPLY
1862 user_handle_t win; /* window handle */
1863 int type; /* message type */
1864 unsigned int msg; /* message code */
1865 unsigned long wparam; /* parameters */
1866 unsigned long lparam; /* parameters */
1867 unsigned long info; /* extra info */
1868 int x; /* x position */
1869 int y; /* y position */
1870 unsigned int time; /* message time */
1871 unsigned int hw_id; /* id if hardware message */
1872 unsigned int active_hooks; /* active hooks bitmap */
1873 data_size_t total; /* total size of extra data */
1874 VARARG(data,message_data); /* message data for sent messages */
1875 @END
1878 /* Reply to a sent message */
1879 @REQ(reply_message)
1880 unsigned int result; /* message result */
1881 int remove; /* should we remove the message? */
1882 VARARG(data,bytes); /* message data for sent messages */
1883 @END
1886 /* Accept the current hardware message */
1887 @REQ(accept_hardware_message)
1888 unsigned int hw_id; /* id of the hardware message */
1889 int remove; /* should we remove the message? */
1890 user_handle_t new_win; /* new destination window for current message */
1891 @END
1894 /* Retrieve the reply for the last message sent */
1895 @REQ(get_message_reply)
1896 int cancel; /* cancel message if not ready? */
1897 @REPLY
1898 unsigned int result; /* message result */
1899 VARARG(data,bytes); /* message data for sent messages */
1900 @END
1903 /* Set a window timer */
1904 @REQ(set_win_timer)
1905 user_handle_t win; /* window handle */
1906 unsigned int msg; /* message to post */
1907 unsigned int rate; /* timer rate in ms */
1908 unsigned long id; /* timer id */
1909 unsigned long lparam; /* message lparam (callback proc) */
1910 @REPLY
1911 unsigned long id; /* timer id */
1912 @END
1915 /* Kill a window timer */
1916 @REQ(kill_win_timer)
1917 user_handle_t win; /* window handle */
1918 unsigned int msg; /* message to post */
1919 unsigned long id; /* timer id */
1920 @END
1923 /* Retrieve info about a serial port */
1924 @REQ(get_serial_info)
1925 obj_handle_t handle; /* handle to comm port */
1926 @REPLY
1927 unsigned int readinterval;
1928 unsigned int readconst;
1929 unsigned int readmult;
1930 unsigned int writeconst;
1931 unsigned int writemult;
1932 unsigned int eventmask;
1933 @END
1936 /* Set info about a serial port */
1937 @REQ(set_serial_info)
1938 obj_handle_t handle; /* handle to comm port */
1939 int flags; /* bitmask to set values (see below) */
1940 unsigned int readinterval;
1941 unsigned int readconst;
1942 unsigned int readmult;
1943 unsigned int writeconst;
1944 unsigned int writemult;
1945 unsigned int eventmask;
1946 @END
1947 #define SERIALINFO_SET_TIMEOUTS 0x01
1948 #define SERIALINFO_SET_MASK 0x02
1951 /* Create an async I/O */
1952 @REQ(register_async)
1953 obj_handle_t handle; /* handle to comm port, socket or file */
1954 int type; /* type of queue to look after */
1955 int count; /* count - usually # of bytes to be read/written */
1956 async_data_t async; /* async I/O parameters */
1957 @END
1958 #define ASYNC_TYPE_READ 0x01
1959 #define ASYNC_TYPE_WRITE 0x02
1960 #define ASYNC_TYPE_WAIT 0x03
1963 /* Cancel all async op on a fd */
1964 @REQ(cancel_async)
1965 obj_handle_t handle; /* handle to comm port, socket or file */
1966 @END
1969 /* Perform an ioctl on a file */
1970 @REQ(ioctl)
1971 obj_handle_t handle; /* handle to the device */
1972 ioctl_code_t code; /* ioctl code */
1973 async_data_t async; /* async I/O parameters */
1974 VARARG(in_data,bytes); /* ioctl input data */
1975 @REPLY
1976 obj_handle_t wait; /* handle to wait on for blocking ioctl */
1977 unsigned int options; /* device open options */
1978 VARARG(out_data,bytes); /* ioctl output data */
1979 @END
1982 /* Create a named pipe */
1983 @REQ(create_named_pipe)
1984 unsigned int access;
1985 unsigned int attributes; /* object attributes */
1986 obj_handle_t rootdir; /* root directory */
1987 unsigned int options;
1988 unsigned int flags;
1989 unsigned int maxinstances;
1990 unsigned int outsize;
1991 unsigned int insize;
1992 timeout_t timeout;
1993 VARARG(name,unicode_str); /* pipe name */
1994 @REPLY
1995 obj_handle_t handle; /* handle to the pipe */
1996 @END
1998 /* flags in create_named_pipe and get_named_pipe_info */
1999 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2000 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2001 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2002 #define NAMED_PIPE_SERVER_END 0x8000
2005 @REQ(get_named_pipe_info)
2006 obj_handle_t handle;
2007 @REPLY
2008 unsigned int flags;
2009 unsigned int maxinstances;
2010 unsigned int instances;
2011 unsigned int outsize;
2012 unsigned int insize;
2013 @END
2016 /* Create a window */
2017 @REQ(create_window)
2018 user_handle_t parent; /* parent window */
2019 user_handle_t owner; /* owner window */
2020 atom_t atom; /* class atom */
2021 void* instance; /* module instance */
2022 @REPLY
2023 user_handle_t handle; /* created window */
2024 user_handle_t parent; /* full handle of parent */
2025 user_handle_t owner; /* full handle of owner */
2026 int extra; /* number of extra bytes */
2027 void* class_ptr; /* pointer to class in client address space */
2028 @END
2031 /* Destroy a window */
2032 @REQ(destroy_window)
2033 user_handle_t handle; /* handle to the window */
2034 @END
2037 /* Retrieve the desktop window for the current thread */
2038 @REQ(get_desktop_window)
2039 int force; /* force creation if it doesn't exist */
2040 @REPLY
2041 user_handle_t handle; /* handle to the desktop window */
2042 @END
2045 /* Set a window owner */
2046 @REQ(set_window_owner)
2047 user_handle_t handle; /* handle to the window */
2048 user_handle_t owner; /* new owner */
2049 @REPLY
2050 user_handle_t full_owner; /* full handle of new owner */
2051 user_handle_t prev_owner; /* full handle of previous owner */
2052 @END
2055 /* Get information from a window handle */
2056 @REQ(get_window_info)
2057 user_handle_t handle; /* handle to the window */
2058 @REPLY
2059 user_handle_t full_handle; /* full 32-bit handle */
2060 user_handle_t last_active; /* last active popup */
2061 process_id_t pid; /* process owning the window */
2062 thread_id_t tid; /* thread owning the window */
2063 atom_t atom; /* class atom */
2064 int is_unicode; /* ANSI or unicode */
2065 @END
2068 /* Set some information in a window */
2069 @REQ(set_window_info)
2070 unsigned int flags; /* flags for fields to set (see below) */
2071 user_handle_t handle; /* handle to the window */
2072 unsigned int style; /* window style */
2073 unsigned int ex_style; /* window extended style */
2074 unsigned int id; /* window id */
2075 int is_unicode; /* ANSI or unicode */
2076 void* instance; /* creator instance */
2077 unsigned long user_data; /* user-specific data */
2078 int extra_offset; /* offset to set in extra bytes */
2079 data_size_t extra_size; /* size to set in extra bytes */
2080 unsigned long extra_value; /* value to set in extra bytes */
2081 @REPLY
2082 unsigned int old_style; /* old window style */
2083 unsigned int old_ex_style; /* old window extended style */
2084 unsigned int old_id; /* old window id */
2085 void* old_instance; /* old creator instance */
2086 unsigned long old_user_data; /* old user-specific data */
2087 unsigned long old_extra_value; /* old value in extra bytes */
2088 @END
2089 #define SET_WIN_STYLE 0x01
2090 #define SET_WIN_EXSTYLE 0x02
2091 #define SET_WIN_ID 0x04
2092 #define SET_WIN_INSTANCE 0x08
2093 #define SET_WIN_USERDATA 0x10
2094 #define SET_WIN_EXTRA 0x20
2095 #define SET_WIN_UNICODE 0x40
2098 /* Set the parent of a window */
2099 @REQ(set_parent)
2100 user_handle_t handle; /* handle to the window */
2101 user_handle_t parent; /* handle to the parent */
2102 @REPLY
2103 user_handle_t old_parent; /* old parent window */
2104 user_handle_t full_parent; /* full handle of new parent */
2105 @END
2108 /* Get a list of the window parents, up to the root of the tree */
2109 @REQ(get_window_parents)
2110 user_handle_t handle; /* handle to the window */
2111 @REPLY
2112 int count; /* total count of parents */
2113 VARARG(parents,user_handles); /* parent handles */
2114 @END
2117 /* Get a list of the window children */
2118 @REQ(get_window_children)
2119 user_handle_t parent; /* parent window */
2120 atom_t atom; /* class atom for the listed children */
2121 thread_id_t tid; /* thread owning the listed children */
2122 @REPLY
2123 int count; /* total count of children */
2124 VARARG(children,user_handles); /* children handles */
2125 @END
2128 /* Get a list of the window children that contain a given point */
2129 @REQ(get_window_children_from_point)
2130 user_handle_t parent; /* parent window */
2131 int x; /* point in parent coordinates */
2132 int y;
2133 @REPLY
2134 int count; /* total count of children */
2135 VARARG(children,user_handles); /* children handles */
2136 @END
2139 /* Get window tree information from a window handle */
2140 @REQ(get_window_tree)
2141 user_handle_t handle; /* handle to the window */
2142 @REPLY
2143 user_handle_t parent; /* parent window */
2144 user_handle_t owner; /* owner window */
2145 user_handle_t next_sibling; /* next sibling in Z-order */
2146 user_handle_t prev_sibling; /* prev sibling in Z-order */
2147 user_handle_t first_sibling; /* first sibling in Z-order */
2148 user_handle_t last_sibling; /* last sibling in Z-order */
2149 user_handle_t first_child; /* first child */
2150 user_handle_t last_child; /* last child */
2151 @END
2153 /* Set the position and Z order of a window */
2154 @REQ(set_window_pos)
2155 unsigned int flags; /* SWP_* flags */
2156 user_handle_t handle; /* handle to the window */
2157 user_handle_t previous; /* previous window in Z order */
2158 rectangle_t window; /* window rectangle */
2159 rectangle_t client; /* client rectangle */
2160 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2161 @REPLY
2162 unsigned int new_style; /* new window style */
2163 @END
2166 /* Get the window and client rectangles of a window */
2167 @REQ(get_window_rectangles)
2168 user_handle_t handle; /* handle to the window */
2169 @REPLY
2170 rectangle_t window; /* window rectangle */
2171 rectangle_t visible; /* visible part of the window rectangle */
2172 rectangle_t client; /* client rectangle */
2173 @END
2176 /* Get the window text */
2177 @REQ(get_window_text)
2178 user_handle_t handle; /* handle to the window */
2179 @REPLY
2180 VARARG(text,unicode_str); /* window text */
2181 @END
2184 /* Set the window text */
2185 @REQ(set_window_text)
2186 user_handle_t handle; /* handle to the window */
2187 VARARG(text,unicode_str); /* window text */
2188 @END
2191 /* Get the coordinates offset between two windows */
2192 @REQ(get_windows_offset)
2193 user_handle_t from; /* handle to the first window */
2194 user_handle_t to; /* handle to the second window */
2195 @REPLY
2196 int x; /* x coordinate offset */
2197 int y; /* y coordinate offset */
2198 @END
2201 /* Get the visible region of a window */
2202 @REQ(get_visible_region)
2203 user_handle_t window; /* handle to the window */
2204 unsigned int flags; /* DCX flags */
2205 @REPLY
2206 user_handle_t top_win; /* top window to clip against */
2207 rectangle_t top_rect; /* top window visible rect with screen coords */
2208 rectangle_t win_rect; /* window rect in screen coords */
2209 data_size_t total_size; /* total size of the resulting region */
2210 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2211 @END
2214 /* Get the window region */
2215 @REQ(get_window_region)
2216 user_handle_t window; /* handle to the window */
2217 @REPLY
2218 data_size_t total_size; /* total size of the resulting region */
2219 VARARG(region,rectangles); /* list of rectangles for the region */
2220 @END
2223 /* Set the window region */
2224 @REQ(set_window_region)
2225 user_handle_t window; /* handle to the window */
2226 int redraw; /* redraw the window? */
2227 VARARG(region,rectangles); /* list of rectangles for the region */
2228 @END
2231 /* Get the window update region */
2232 @REQ(get_update_region)
2233 user_handle_t window; /* handle to the window */
2234 user_handle_t from_child; /* child to start searching from */
2235 unsigned int flags; /* update flags (see below) */
2236 @REPLY
2237 user_handle_t child; /* child to repaint (or window itself) */
2238 unsigned int flags; /* resulting update flags (see below) */
2239 data_size_t total_size; /* total size of the resulting region */
2240 VARARG(region,rectangles); /* list of rectangles for the region */
2241 @END
2242 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2243 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2244 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2245 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2246 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2247 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2248 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2251 /* Update the z order of a window so that a given rectangle is fully visible */
2252 @REQ(update_window_zorder)
2253 user_handle_t window; /* handle to the window */
2254 rectangle_t rect; /* rectangle that must be visible */
2255 @END
2258 /* Mark parts of a window as needing a redraw */
2259 @REQ(redraw_window)
2260 user_handle_t window; /* handle to the window */
2261 unsigned int flags; /* RDW_* flags */
2262 VARARG(region,rectangles); /* list of rectangles for the region */
2263 @END
2266 /* Set a window property */
2267 @REQ(set_window_property)
2268 user_handle_t window; /* handle to the window */
2269 atom_t atom; /* property atom (if no name specified) */
2270 obj_handle_t handle; /* handle to store */
2271 VARARG(name,unicode_str); /* property name */
2272 @END
2275 /* Remove a window property */
2276 @REQ(remove_window_property)
2277 user_handle_t window; /* handle to the window */
2278 atom_t atom; /* property atom (if no name specified) */
2279 VARARG(name,unicode_str); /* property name */
2280 @REPLY
2281 obj_handle_t handle; /* handle stored in property */
2282 @END
2285 /* Get a window property */
2286 @REQ(get_window_property)
2287 user_handle_t window; /* handle to the window */
2288 atom_t atom; /* property atom (if no name specified) */
2289 VARARG(name,unicode_str); /* property name */
2290 @REPLY
2291 obj_handle_t handle; /* handle stored in property */
2292 @END
2295 /* Get the list of properties of a window */
2296 @REQ(get_window_properties)
2297 user_handle_t window; /* handle to the window */
2298 @REPLY
2299 int total; /* total number of properties */
2300 VARARG(props,properties); /* list of properties */
2301 @END
2304 /* Create a window station */
2305 @REQ(create_winstation)
2306 unsigned int flags; /* window station flags */
2307 unsigned int access; /* wanted access rights */
2308 unsigned int attributes; /* object attributes */
2309 VARARG(name,unicode_str); /* object name */
2310 @REPLY
2311 obj_handle_t handle; /* handle to the window station */
2312 @END
2315 /* Open a handle to a window station */
2316 @REQ(open_winstation)
2317 unsigned int access; /* wanted access rights */
2318 unsigned int attributes; /* object attributes */
2319 VARARG(name,unicode_str); /* object name */
2320 @REPLY
2321 obj_handle_t handle; /* handle to the window station */
2322 @END
2325 /* Close a window station */
2326 @REQ(close_winstation)
2327 obj_handle_t handle; /* handle to the window station */
2328 @END
2331 /* Get the process current window station */
2332 @REQ(get_process_winstation)
2333 @REPLY
2334 obj_handle_t handle; /* handle to the window station */
2335 @END
2338 /* Set the process current window station */
2339 @REQ(set_process_winstation)
2340 obj_handle_t handle; /* handle to the window station */
2341 @END
2344 /* Create a desktop */
2345 @REQ(create_desktop)
2346 unsigned int flags; /* desktop flags */
2347 unsigned int access; /* wanted access rights */
2348 unsigned int attributes; /* object attributes */
2349 VARARG(name,unicode_str); /* object name */
2350 @REPLY
2351 obj_handle_t handle; /* handle to the desktop */
2352 @END
2355 /* Open a handle to a desktop */
2356 @REQ(open_desktop)
2357 unsigned int flags; /* desktop flags */
2358 unsigned int access; /* wanted access rights */
2359 unsigned int attributes; /* object attributes */
2360 VARARG(name,unicode_str); /* object name */
2361 @REPLY
2362 obj_handle_t handle; /* handle to the desktop */
2363 @END
2366 /* Close a desktop */
2367 @REQ(close_desktop)
2368 obj_handle_t handle; /* handle to the desktop */
2369 @END
2372 /* Get the thread current desktop */
2373 @REQ(get_thread_desktop)
2374 thread_id_t tid; /* thread id */
2375 @REPLY
2376 obj_handle_t handle; /* handle to the desktop */
2377 @END
2380 /* Set the thread current desktop */
2381 @REQ(set_thread_desktop)
2382 obj_handle_t handle; /* handle to the desktop */
2383 @END
2386 /* Get/set information about a user object (window station or desktop) */
2387 @REQ(set_user_object_info)
2388 obj_handle_t handle; /* handle to the object */
2389 unsigned int flags; /* information to set */
2390 unsigned int obj_flags; /* new object flags */
2391 @REPLY
2392 int is_desktop; /* is object a desktop? */
2393 unsigned int old_obj_flags; /* old object flags */
2394 VARARG(name,unicode_str); /* object name */
2395 @END
2396 #define SET_USER_OBJECT_FLAGS 1
2399 /* Attach (or detach) thread inputs */
2400 @REQ(attach_thread_input)
2401 thread_id_t tid_from; /* thread to be attached */
2402 thread_id_t tid_to; /* thread to which tid_from should be attached */
2403 int attach; /* is it an attach? */
2404 @END
2407 /* Get input data for a given thread */
2408 @REQ(get_thread_input)
2409 thread_id_t tid; /* id of thread */
2410 @REPLY
2411 user_handle_t focus; /* handle to the focus window */
2412 user_handle_t capture; /* handle to the capture window */
2413 user_handle_t active; /* handle to the active window */
2414 user_handle_t foreground; /* handle to the global foreground window */
2415 user_handle_t menu_owner; /* handle to the menu owner */
2416 user_handle_t move_size; /* handle to the moving/resizing window */
2417 user_handle_t caret; /* handle to the caret window */
2418 rectangle_t rect; /* caret rectangle */
2419 @END
2422 /* Get the time of the last input event */
2423 @REQ(get_last_input_time)
2424 @REPLY
2425 unsigned int time;
2426 @END
2429 /* Retrieve queue keyboard state for a given thread */
2430 @REQ(get_key_state)
2431 thread_id_t tid; /* id of thread */
2432 int key; /* optional key code or -1 */
2433 @REPLY
2434 unsigned char state; /* state of specified key */
2435 VARARG(keystate,bytes); /* state array for all the keys */
2436 @END
2438 /* Set queue keyboard state for a given thread */
2439 @REQ(set_key_state)
2440 thread_id_t tid; /* id of thread */
2441 VARARG(keystate,bytes); /* state array for all the keys */
2442 @END
2444 /* Set the system foreground window */
2445 @REQ(set_foreground_window)
2446 user_handle_t handle; /* handle to the foreground window */
2447 @REPLY
2448 user_handle_t previous; /* handle to the previous foreground window */
2449 int send_msg_old; /* whether we have to send a msg to the old window */
2450 int send_msg_new; /* whether we have to send a msg to the new window */
2451 @END
2453 /* Set the current thread focus window */
2454 @REQ(set_focus_window)
2455 user_handle_t handle; /* handle to the focus window */
2456 @REPLY
2457 user_handle_t previous; /* handle to the previous focus window */
2458 @END
2460 /* Set the current thread active window */
2461 @REQ(set_active_window)
2462 user_handle_t handle; /* handle to the active window */
2463 @REPLY
2464 user_handle_t previous; /* handle to the previous active window */
2465 @END
2467 /* Set the current thread capture window */
2468 @REQ(set_capture_window)
2469 user_handle_t handle; /* handle to the capture window */
2470 unsigned int flags; /* capture flags (see below) */
2471 @REPLY
2472 user_handle_t previous; /* handle to the previous capture window */
2473 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2474 @END
2475 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2476 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2479 /* Set the current thread caret window */
2480 @REQ(set_caret_window)
2481 user_handle_t handle; /* handle to the caret window */
2482 int width; /* caret width */
2483 int height; /* caret height */
2484 @REPLY
2485 user_handle_t previous; /* handle to the previous caret window */
2486 rectangle_t old_rect; /* previous caret rectangle */
2487 int old_hide; /* previous hide count */
2488 int old_state; /* previous caret state (1=on, 0=off) */
2489 @END
2492 /* Set the current thread caret information */
2493 @REQ(set_caret_info)
2494 unsigned int flags; /* caret flags (see below) */
2495 user_handle_t handle; /* handle to the caret window */
2496 int x; /* caret x position */
2497 int y; /* caret y position */
2498 int hide; /* increment for hide count (can be negative to show it) */
2499 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2500 @REPLY
2501 user_handle_t full_handle; /* handle to the current caret window */
2502 rectangle_t old_rect; /* previous caret rectangle */
2503 int old_hide; /* previous hide count */
2504 int old_state; /* previous caret state (1=on, 0=off) */
2505 @END
2506 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2507 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2508 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2511 /* Set a window hook */
2512 @REQ(set_hook)
2513 int id; /* id of the hook */
2514 process_id_t pid; /* id of process to set the hook into */
2515 thread_id_t tid; /* id of thread to set the hook into */
2516 int event_min;
2517 int event_max;
2518 int flags;
2519 void* proc; /* hook procedure */
2520 int unicode; /* is it a unicode hook? */
2521 VARARG(module,unicode_str); /* module name */
2522 @REPLY
2523 user_handle_t handle; /* handle to the hook */
2524 unsigned int active_hooks; /* active hooks bitmap */
2525 @END
2528 /* Remove a window hook */
2529 @REQ(remove_hook)
2530 user_handle_t handle; /* handle to the hook */
2531 int id; /* id of the hook if handle is 0 */
2532 void* proc; /* hook procedure if handle is 0 */
2533 @REPLY
2534 unsigned int active_hooks; /* active hooks bitmap */
2535 @END
2538 /* Start calling a hook chain */
2539 @REQ(start_hook_chain)
2540 int id; /* id of the hook */
2541 int event; /* signalled event */
2542 user_handle_t window; /* handle to the event window */
2543 int object_id; /* object id for out of context winevent */
2544 int child_id; /* child id for out of context winevent */
2545 @REPLY
2546 user_handle_t handle; /* handle to the next hook */
2547 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2548 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2549 void* proc; /* hook procedure */
2550 int unicode; /* is it a unicode hook? */
2551 unsigned int active_hooks; /* active hooks bitmap */
2552 VARARG(module,unicode_str); /* module name */
2553 @END
2556 /* Finished calling a hook chain */
2557 @REQ(finish_hook_chain)
2558 int id; /* id of the hook */
2559 @END
2562 /* Get the hook information */
2563 @REQ(get_hook_info)
2564 user_handle_t handle; /* handle to the current hook */
2565 int get_next; /* do we want info about current or next hook? */
2566 int event; /* signalled event */
2567 user_handle_t window; /* handle to the event window */
2568 int object_id; /* object id for out of context winevent */
2569 int child_id; /* child id for out of context winevent */
2570 @REPLY
2571 user_handle_t handle; /* handle to the hook */
2572 int id; /* id of the hook */
2573 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2574 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2575 void* proc; /* hook procedure */
2576 int unicode; /* is it a unicode hook? */
2577 VARARG(module,unicode_str); /* module name */
2578 @END
2581 /* Create a window class */
2582 @REQ(create_class)
2583 int local; /* is it a local class? */
2584 atom_t atom; /* class atom */
2585 unsigned int style; /* class style */
2586 void* instance; /* module instance */
2587 int extra; /* number of extra class bytes */
2588 int win_extra; /* number of window extra bytes */
2589 void* client_ptr; /* pointer to class in client address space */
2590 @END
2593 /* Destroy a window class */
2594 @REQ(destroy_class)
2595 atom_t atom; /* class atom */
2596 void* instance; /* module instance */
2597 @REPLY
2598 void* client_ptr; /* pointer to class in client address space */
2599 @END
2602 /* Set some information in a class */
2603 @REQ(set_class_info)
2604 user_handle_t window; /* handle to the window */
2605 unsigned int flags; /* flags for info to set (see below) */
2606 atom_t atom; /* class atom */
2607 unsigned int style; /* class style */
2608 int win_extra; /* number of window extra bytes */
2609 void* instance; /* module instance */
2610 int extra_offset; /* offset to set in extra bytes */
2611 data_size_t extra_size; /* size to set in extra bytes */
2612 unsigned long extra_value; /* value to set in extra bytes */
2613 @REPLY
2614 atom_t old_atom; /* previous class atom */
2615 unsigned int old_style; /* previous class style */
2616 int old_extra; /* previous number of class extra bytes */
2617 int old_win_extra; /* previous number of window extra bytes */
2618 void* old_instance; /* previous module instance */
2619 unsigned long old_extra_value; /* old value in extra bytes */
2620 @END
2621 #define SET_CLASS_ATOM 0x0001
2622 #define SET_CLASS_STYLE 0x0002
2623 #define SET_CLASS_WINEXTRA 0x0004
2624 #define SET_CLASS_INSTANCE 0x0008
2625 #define SET_CLASS_EXTRA 0x0010
2628 /* Set/get clipboard information */
2629 @REQ(set_clipboard_info)
2630 unsigned int flags; /* flags for fields to set (see below) */
2631 user_handle_t clipboard; /* clipboard window */
2632 user_handle_t owner; /* clipboard owner */
2633 user_handle_t viewer; /* first clipboard viewer */
2634 unsigned int seqno; /* change sequence number */
2635 @REPLY
2636 unsigned int flags; /* status flags (see below) */
2637 user_handle_t old_clipboard; /* old clipboard window */
2638 user_handle_t old_owner; /* old clipboard owner */
2639 user_handle_t old_viewer; /* old clipboard viewer */
2640 unsigned int seqno; /* current sequence number */
2641 @END
2643 #define SET_CB_OPEN 0x001
2644 #define SET_CB_OWNER 0x002
2645 #define SET_CB_VIEWER 0x004
2646 #define SET_CB_SEQNO 0x008
2647 #define SET_CB_RELOWNER 0x010
2648 #define SET_CB_CLOSE 0x020
2649 #define CB_OPEN 0x040
2650 #define CB_OWNER 0x080
2651 #define CB_PROCESS 0x100
2654 /* Open a security token */
2655 @REQ(open_token)
2656 obj_handle_t handle; /* handle to the thread or process */
2657 unsigned int access; /* access rights to the new token */
2658 unsigned int attributes;/* object attributes */
2659 unsigned int flags; /* flags (see below) */
2660 @REPLY
2661 obj_handle_t token; /* handle to the token */
2662 @END
2663 #define OPEN_TOKEN_THREAD 1
2664 #define OPEN_TOKEN_AS_SELF 2
2667 /* Set/get the global windows */
2668 @REQ(set_global_windows)
2669 unsigned int flags; /* flags for fields to set (see below) */
2670 user_handle_t shell_window; /* handle to the new shell window */
2671 user_handle_t shell_listview; /* handle to the new shell listview window */
2672 user_handle_t progman_window; /* handle to the new program manager window */
2673 user_handle_t taskman_window; /* handle to the new task manager window */
2674 @REPLY
2675 user_handle_t old_shell_window; /* handle to the shell window */
2676 user_handle_t old_shell_listview; /* handle to the shell listview window */
2677 user_handle_t old_progman_window; /* handle to the new program manager window */
2678 user_handle_t old_taskman_window; /* handle to the new task manager window */
2679 @END
2680 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2681 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2682 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2684 /* Adjust the privileges held by a token */
2685 @REQ(adjust_token_privileges)
2686 obj_handle_t handle; /* handle to the token */
2687 int disable_all; /* disable all privileges? */
2688 int get_modified_state; /* get modified privileges? */
2689 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2690 @REPLY
2691 unsigned int len; /* total length in bytes required to store token privileges */
2692 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2693 @END
2695 /* Retrieves the set of privileges held by or available to a token */
2696 @REQ(get_token_privileges)
2697 obj_handle_t handle; /* handle to the token */
2698 @REPLY
2699 unsigned int len; /* total length in bytes required to store token privileges */
2700 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2701 @END
2703 /* Check the token has the required privileges */
2704 @REQ(check_token_privileges)
2705 obj_handle_t handle; /* handle to the token */
2706 int all_required; /* are all the privileges required for the check to succeed? */
2707 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2708 @REPLY
2709 int has_privileges; /* does the token have the required privileges? */
2710 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2711 @END
2713 @REQ(duplicate_token)
2714 obj_handle_t handle; /* handle to the token to duplicate */
2715 unsigned int access; /* access rights to the new token */
2716 unsigned int attributes; /* object attributes */
2717 int primary; /* is the new token to be a primary one? */
2718 int impersonation_level; /* impersonation level of the new token */
2719 @REPLY
2720 obj_handle_t new_handle; /* duplicated handle */
2721 @END
2723 @REQ(access_check)
2724 obj_handle_t handle; /* handle to the token */
2725 unsigned int desired_access; /* desired access to the object */
2726 unsigned int mapping_read; /* mapping from generic read to specific rights */
2727 unsigned int mapping_write; /* mapping from generic write to specific rights */
2728 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2729 unsigned int mapping_all; /* mapping from generic all to specific rights */
2730 VARARG(sd,security_descriptor); /* security descriptor to check */
2731 @REPLY
2732 unsigned int access_granted; /* access rights actually granted */
2733 unsigned int access_status; /* was access granted? */
2734 unsigned int privileges_len; /* length needed to store privileges */
2735 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2736 @END
2738 @REQ(get_token_user)
2739 obj_handle_t handle; /* handle to the token */
2740 @REPLY
2741 data_size_t user_len; /* length needed to store user */
2742 VARARG(user,SID); /* sid of the user the token represents */
2743 @END
2745 @REQ(get_token_groups)
2746 obj_handle_t handle; /* handle to the token */
2747 @REPLY
2748 data_size_t user_len; /* length needed to store user */
2749 VARARG(user,token_groups); /* groups the token's user belongs to */
2750 @END
2752 @REQ(set_security_object)
2753 obj_handle_t handle; /* handle to the object */
2754 unsigned int security_info; /* which parts of security descriptor to set */
2755 VARARG(sd,security_descriptor); /* security descriptor to set */
2756 @END
2758 /* Create a mailslot */
2759 @REQ(create_mailslot)
2760 unsigned int access; /* wanted access rights */
2761 unsigned int attributes; /* object attributes */
2762 obj_handle_t rootdir; /* root directory */
2763 unsigned int max_msgsize;
2764 timeout_t read_timeout;
2765 VARARG(name,unicode_str); /* mailslot name */
2766 @REPLY
2767 obj_handle_t handle; /* handle to the mailslot */
2768 @END
2771 /* Set mailslot information */
2772 @REQ(set_mailslot_info)
2773 obj_handle_t handle; /* handle to the mailslot */
2774 unsigned int flags;
2775 timeout_t read_timeout;
2776 @REPLY
2777 unsigned int max_msgsize;
2778 timeout_t read_timeout;
2779 @END
2780 #define MAILSLOT_SET_READ_TIMEOUT 1
2783 /* Create a directory object */
2784 @REQ(create_directory)
2785 unsigned int access; /* access flags */
2786 unsigned int attributes; /* object attributes */
2787 obj_handle_t rootdir; /* root directory */
2788 VARARG(directory_name,unicode_str); /* Directory name */
2789 @REPLY
2790 obj_handle_t handle; /* handle to the directory */
2791 @END
2794 /* Open a directory object */
2795 @REQ(open_directory)
2796 unsigned int access; /* access flags */
2797 unsigned int attributes; /* object attributes */
2798 obj_handle_t rootdir; /* root directory */
2799 VARARG(directory_name,unicode_str); /* Directory name */
2800 @REPLY
2801 obj_handle_t handle; /* handle to the directory */
2802 @END
2805 /* Create a symbolic link object */
2806 @REQ(create_symlink)
2807 unsigned int access; /* access flags */
2808 unsigned int attributes; /* object attributes */
2809 obj_handle_t rootdir; /* root directory */
2810 data_size_t name_len; /* length of the symlink name in bytes */
2811 VARARG(name,unicode_str,name_len); /* symlink name */
2812 VARARG(target_name,unicode_str); /* target name */
2813 @REPLY
2814 obj_handle_t handle; /* handle to the symlink */
2815 @END
2818 /* Open a symbolic link object */
2819 @REQ(open_symlink)
2820 unsigned int access; /* access flags */
2821 unsigned int attributes; /* object attributes */
2822 obj_handle_t rootdir; /* root directory */
2823 VARARG(name,unicode_str); /* symlink name */
2824 @REPLY
2825 obj_handle_t handle; /* handle to the symlink */
2826 @END
2829 /* Query a symbolic link object */
2830 @REQ(query_symlink)
2831 obj_handle_t handle; /* handle to the symlink */
2832 @REPLY
2833 VARARG(target_name,unicode_str); /* target name */
2834 @END
2837 /* Query basic object information */
2838 @REQ(get_object_info)
2839 obj_handle_t handle; /* handle to the object */
2840 @REPLY
2841 unsigned int access; /* granted access mask */
2842 unsigned int ref_count; /* object ref count */
2843 @END
2845 /* Query the impersonation level of an impersonation token */
2846 @REQ(get_token_impersonation_level)
2847 obj_handle_t handle; /* handle to the object */
2848 @REPLY
2849 int impersonation_level; /* impersonation level of the impersonation token */
2850 @END
2852 /* Allocate a locally-unique identifier */
2853 @REQ(allocate_locally_unique_id)
2854 @REPLY
2855 luid_t luid;
2856 @END