Accept DSERR_NODRIVER from IDirectSoundCapture_CreateCaptureBuffer.
[wine/multimedia.git] / server / protocol.def
blob2f6556ea680d9a29d2d5ec7e2e9e7329d20f5842
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 struct request_header
36 int req; /* request code */
37 size_t request_size; /* request variable part size */
38 size_t reply_size; /* reply variable part maximum size */
41 struct reply_header
43 unsigned int error; /* error result */
44 size_t reply_size; /* reply variable part size */
47 /* placeholder structure for the maximum allowed request size */
48 /* this is used to construct the generic_request union */
49 struct request_max_size
51 int pad[16]; /* the max request size is 16 ints */
54 typedef void *obj_handle_t;
55 typedef void *user_handle_t;
56 typedef unsigned short atom_t;
57 typedef unsigned int process_id_t;
58 typedef unsigned int thread_id_t;
60 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
61 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
64 /* definitions of the event data depending on the event code */
65 struct debug_event_exception
67 EXCEPTION_RECORD record; /* exception record */
68 int first; /* first chance exception? */
70 struct debug_event_create_thread
72 obj_handle_t handle; /* handle to the new thread */
73 void *teb; /* thread teb (in debugged process address space) */
74 void *start; /* thread startup routine */
76 struct debug_event_create_process
78 obj_handle_t file; /* handle to the process exe file */
79 obj_handle_t process; /* handle to the new process */
80 obj_handle_t thread; /* handle to the new thread */
81 void *base; /* base of executable image */
82 int dbg_offset; /* offset of debug info in file */
83 int dbg_size; /* size of debug info */
84 void *teb; /* thread teb (in debugged process address space) */
85 void *start; /* thread startup routine */
86 void *name; /* image name (optional) */
87 int unicode; /* is it Unicode? */
89 struct debug_event_exit
91 int exit_code; /* thread or process exit code */
93 struct debug_event_load_dll
95 obj_handle_t handle; /* file handle for the dll */
96 void *base; /* base address of the dll */
97 int dbg_offset; /* offset of debug info in file */
98 int dbg_size; /* size of debug info */
99 void *name; /* image name (optional) */
100 int unicode; /* is it Unicode? */
102 struct debug_event_unload_dll
104 void *base; /* base address of the dll */
106 struct debug_event_output_string
108 void *string; /* string to display (in debugged process address space) */
109 int unicode; /* is it Unicode? */
110 int length; /* string length */
112 struct debug_event_rip_info
114 int error; /* ??? */
115 int type; /* ??? */
117 union debug_event_data
119 struct debug_event_exception exception;
120 struct debug_event_create_thread create_thread;
121 struct debug_event_create_process create_process;
122 struct debug_event_exit exit;
123 struct debug_event_load_dll load_dll;
124 struct debug_event_unload_dll unload_dll;
125 struct debug_event_output_string output_string;
126 struct debug_event_rip_info rip_info;
129 /* debug event data */
130 typedef struct
132 int code; /* event code */
133 union debug_event_data info; /* event information */
134 } debug_event_t;
136 /* structure used in sending an fd from client to server */
137 struct send_fd
139 thread_id_t tid; /* thread id */
140 int fd; /* file descriptor on client-side */
143 /* structure sent by the server on the wait fifo */
144 struct wake_up_reply
146 void *cookie; /* magic cookie that was passed in select_request */
147 int signaled; /* wait result */
150 /* structure for absolute timeouts */
151 typedef struct
153 int sec; /* seconds since Unix epoch */
154 int usec; /* microseconds */
155 } abs_time_t;
157 /* structure returned in the list of window properties */
158 typedef struct
160 atom_t atom; /* property atom */
161 short string; /* was atom a string originally? */
162 obj_handle_t handle; /* handle stored in property */
163 } property_data_t;
165 /* structure to specify window rectangles */
166 typedef struct
168 int left;
169 int top;
170 int right;
171 int bottom;
172 } rectangle_t;
174 /* structure for console char/attribute info */
175 typedef struct
177 WCHAR ch;
178 unsigned short attr;
179 } char_info_t;
181 #define MAX_ACL_LEN 65535
183 struct security_descriptor
185 unsigned int control; /* SE_ flags */
186 size_t owner_len;
187 size_t group_len;
188 size_t sacl_len;
189 size_t dacl_len;
190 /* VARARGS(owner,SID); */
191 /* VARARGS(group,SID); */
192 /* VARARGS(sacl,ACL); */
193 /* VARARGS(dacl,ACL); */
196 /****************************************************************/
197 /* Request declarations */
199 /* Create a new process from the context of the parent */
200 @REQ(new_process)
201 int inherit_all; /* inherit all handles from parent */
202 int create_flags; /* creation flags */
203 int unix_pid; /* Unix pid of new process */
204 obj_handle_t exe_file; /* file handle for main exe */
205 obj_handle_t hstdin; /* handle for stdin */
206 obj_handle_t hstdout; /* handle for stdout */
207 obj_handle_t hstderr; /* handle for stderr */
208 VARARG(info,startup_info); /* startup information */
209 VARARG(env,unicode_str); /* environment for new process */
210 @REPLY
211 obj_handle_t info; /* new process info handle */
212 @END
215 /* Retrieve information about a newly started process */
216 @REQ(get_new_process_info)
217 obj_handle_t info; /* info handle returned from new_process_request */
218 int pinherit; /* process handle inherit flag */
219 int tinherit; /* thread handle inherit flag */
220 @REPLY
221 process_id_t pid; /* process id */
222 obj_handle_t phandle; /* process handle (in the current process) */
223 thread_id_t tid; /* thread id */
224 obj_handle_t thandle; /* thread handle (in the current process) */
225 int success; /* did the process start successfully? */
226 @END
229 /* Create a new thread from the context of the parent */
230 @REQ(new_thread)
231 int suspend; /* new thread should be suspended on creation */
232 int inherit; /* inherit flag */
233 int request_fd; /* fd for request pipe */
234 @REPLY
235 thread_id_t tid; /* thread id */
236 obj_handle_t handle; /* thread handle (in the current process) */
237 @END
240 /* Signal that we are finished booting on the client side */
241 @REQ(boot_done)
242 int debug_level; /* new debug level */
243 @END
246 /* Initialize a process; called from the new process context */
247 @REQ(init_process)
248 void* peb; /* addr of PEB */
249 void* ldt_copy; /* addr of LDT copy */
250 @REPLY
251 int create_flags; /* creation flags */
252 unsigned int server_start; /* server start time (GetTickCount) */
253 size_t info_size; /* total size of startup info */
254 obj_handle_t exe_file; /* file handle for main exe */
255 obj_handle_t hstdin; /* handle for stdin */
256 obj_handle_t hstdout; /* handle for stdout */
257 obj_handle_t hstderr; /* handle for stderr */
258 @END
261 /* Retrieve the new process startup info */
262 @REQ(get_startup_info)
263 @REPLY
264 VARARG(info,startup_info); /* startup information */
265 VARARG(env,unicode_str); /* environment */
266 @END
269 /* Signal the end of the process initialization */
270 @REQ(init_process_done)
271 void* module; /* main module base address */
272 size_t module_size; /* main module size */
273 void* entry; /* process entry point */
274 void* name; /* ptr to ptr to name (in process addr space) */
275 obj_handle_t exe_file; /* file handle for main exe */
276 int gui; /* is it a GUI process? */
277 VARARG(filename,unicode_str); /* file name of main exe */
278 @END
281 /* Initialize a thread; called from the child after fork()/clone() */
282 @REQ(init_thread)
283 int unix_pid; /* Unix pid of new thread */
284 int unix_tid; /* Unix tid of new thread */
285 void* teb; /* TEB of new thread (in thread address space) */
286 void* entry; /* thread entry point (in thread address space) */
287 int reply_fd; /* fd for reply pipe */
288 int wait_fd; /* fd for blocking calls pipe */
289 @REPLY
290 process_id_t pid; /* process id of the new thread's process */
291 thread_id_t tid; /* thread id of the new thread */
292 int boot; /* is this the boot thread? */
293 int version; /* protocol version */
294 @END
297 /* Terminate a process */
298 @REQ(terminate_process)
299 obj_handle_t handle; /* process handle to terminate */
300 int exit_code; /* process exit code */
301 @REPLY
302 int self; /* suicide? */
303 @END
306 /* Terminate a thread */
307 @REQ(terminate_thread)
308 obj_handle_t handle; /* thread handle to terminate */
309 int exit_code; /* thread exit code */
310 @REPLY
311 int self; /* suicide? */
312 int last; /* last thread in this process? */
313 @END
316 /* Retrieve information about a process */
317 @REQ(get_process_info)
318 obj_handle_t handle; /* process handle */
319 @REPLY
320 process_id_t pid; /* server process id */
321 process_id_t ppid; /* server process id of parent */
322 int exit_code; /* process exit code */
323 int priority; /* priority class */
324 int process_affinity; /* process affinity mask */
325 int system_affinity; /* system affinity mask */
326 void* peb; /* PEB address in process address space */
327 @END
330 /* Set a process informations */
331 @REQ(set_process_info)
332 obj_handle_t handle; /* process handle */
333 int mask; /* setting mask (see below) */
334 int priority; /* priority class */
335 int affinity; /* affinity mask */
336 @END
337 #define SET_PROCESS_INFO_PRIORITY 0x01
338 #define SET_PROCESS_INFO_AFFINITY 0x02
341 /* Retrieve information about a thread */
342 @REQ(get_thread_info)
343 obj_handle_t handle; /* thread handle */
344 thread_id_t tid_in; /* thread id (optional) */
345 @REPLY
346 process_id_t pid; /* server process id */
347 thread_id_t tid; /* server thread id */
348 void* teb; /* thread teb pointer */
349 int exit_code; /* thread exit code */
350 int priority; /* thread priority level */
351 int affinity; /* thread affinity mask */
352 time_t creation_time; /* thread creation time */
353 time_t exit_time; /* thread exit time */
354 @END
357 /* Set a thread informations */
358 @REQ(set_thread_info)
359 obj_handle_t handle; /* thread handle */
360 int mask; /* setting mask (see below) */
361 int priority; /* priority class */
362 int affinity; /* affinity mask */
363 obj_handle_t token; /* impersonation token */
364 @END
365 #define SET_THREAD_INFO_PRIORITY 0x01
366 #define SET_THREAD_INFO_AFFINITY 0x02
367 #define SET_THREAD_INFO_TOKEN 0x04
370 /* Retrieve information about a module */
371 @REQ(get_dll_info)
372 obj_handle_t handle; /* process handle */
373 void* base_address; /* base address of module */
374 @REPLY
375 size_t size; /* module size */
376 void* entry_point;
377 VARARG(filename,unicode_str); /* file name of module */
378 @END
381 /* Suspend a thread */
382 @REQ(suspend_thread)
383 obj_handle_t handle; /* thread handle */
384 @REPLY
385 int count; /* new suspend count */
386 @END
389 /* Resume a thread */
390 @REQ(resume_thread)
391 obj_handle_t handle; /* thread handle */
392 @REPLY
393 int count; /* new suspend count */
394 @END
397 /* Notify the server that a dll has been loaded */
398 @REQ(load_dll)
399 obj_handle_t handle; /* file handle */
400 void* base; /* base address */
401 size_t size; /* dll size */
402 int dbg_offset; /* debug info offset */
403 int dbg_size; /* debug info size */
404 void* name; /* ptr to ptr to name (in process addr space) */
405 VARARG(filename,unicode_str); /* file name of dll */
406 @END
409 /* Notify the server that a dll is being unloaded */
410 @REQ(unload_dll)
411 void* base; /* base address */
412 @END
415 /* Queue an APC for a thread */
416 @REQ(queue_apc)
417 obj_handle_t handle; /* thread handle */
418 int user; /* user or system apc? */
419 void* func; /* function to call */
420 void* arg1; /* params for function to call */
421 void* arg2;
422 void* arg3;
423 @END
426 /* Get next APC to call */
427 @REQ(get_apc)
428 int alertable; /* is thread alertable? */
429 @REPLY
430 void* func; /* function to call */
431 int type; /* function type */
432 void* arg1; /* function arguments */
433 void* arg2;
434 void* arg3;
435 @END
436 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
439 /* Close a handle for the current process */
440 @REQ(close_handle)
441 obj_handle_t handle; /* handle to close */
442 @REPLY
443 int fd; /* associated fd to close */
444 @END
447 /* Set a handle information */
448 @REQ(set_handle_info)
449 obj_handle_t handle; /* handle we are interested in */
450 int flags; /* new handle flags */
451 int mask; /* mask for flags to set */
452 int fd; /* file descriptor or -1 */
453 @REPLY
454 int old_flags; /* old flag value */
455 int cur_fd; /* current file descriptor */
456 @END
459 /* Duplicate a handle */
460 @REQ(dup_handle)
461 obj_handle_t src_process; /* src process handle */
462 obj_handle_t src_handle; /* src handle to duplicate */
463 obj_handle_t dst_process; /* dst process handle */
464 unsigned int access; /* wanted access rights */
465 int inherit; /* inherit flag */
466 int options; /* duplicate options (see below) */
467 @REPLY
468 obj_handle_t handle; /* duplicated handle in dst process */
469 int fd; /* associated fd to close */
470 @END
471 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
472 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
473 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
476 /* Open a handle to a process */
477 @REQ(open_process)
478 process_id_t pid; /* process id to open */
479 unsigned int access; /* wanted access rights */
480 int inherit; /* inherit flag */
481 @REPLY
482 obj_handle_t handle; /* handle to the process */
483 @END
486 /* Open a handle to a thread */
487 @REQ(open_thread)
488 thread_id_t tid; /* thread id to open */
489 unsigned int access; /* wanted access rights */
490 int inherit; /* inherit flag */
491 @REPLY
492 obj_handle_t handle; /* handle to the thread */
493 @END
496 /* Wait for handles */
497 @REQ(select)
498 int flags; /* wait flags (see below) */
499 void* cookie; /* magic cookie to return to client */
500 obj_handle_t signal; /* object to signal (0 if none) */
501 abs_time_t timeout; /* absolute timeout */
502 VARARG(handles,handles); /* handles to select on */
503 @END
504 #define SELECT_ALL 1
505 #define SELECT_ALERTABLE 2
506 #define SELECT_INTERRUPTIBLE 4
507 #define SELECT_TIMEOUT 8
510 /* Create an event */
511 @REQ(create_event)
512 unsigned int access; /* wanted access rights */
513 int manual_reset; /* manual reset event */
514 int initial_state; /* initial state of the event */
515 int inherit; /* inherit flag */
516 VARARG(name,unicode_str); /* object name */
517 @REPLY
518 obj_handle_t handle; /* handle to the event */
519 @END
521 /* Event operation */
522 @REQ(event_op)
523 obj_handle_t handle; /* handle to event */
524 int op; /* event operation (see below) */
525 @END
526 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
529 /* Open an event */
530 @REQ(open_event)
531 unsigned int access; /* wanted access rights */
532 int inherit; /* inherit flag */
533 VARARG(name,unicode_str); /* object name */
534 @REPLY
535 obj_handle_t handle; /* handle to the event */
536 @END
539 /* Create a mutex */
540 @REQ(create_mutex)
541 unsigned int access; /* wanted access rights */
542 int owned; /* initially owned? */
543 int inherit; /* inherit flag */
544 VARARG(name,unicode_str); /* object name */
545 @REPLY
546 obj_handle_t handle; /* handle to the mutex */
547 @END
550 /* Release a mutex */
551 @REQ(release_mutex)
552 obj_handle_t handle; /* handle to the mutex */
553 @REPLY
554 unsigned int prev_count; /* value of internal counter, before release */
555 @END
558 /* Open a mutex */
559 @REQ(open_mutex)
560 unsigned int access; /* wanted access rights */
561 int inherit; /* inherit flag */
562 VARARG(name,unicode_str); /* object name */
563 @REPLY
564 obj_handle_t handle; /* handle to the mutex */
565 @END
568 /* Create a semaphore */
569 @REQ(create_semaphore)
570 unsigned int access; /* wanted access rights */
571 unsigned int initial; /* initial count */
572 unsigned int max; /* maximum count */
573 int inherit; /* inherit flag */
574 VARARG(name,unicode_str); /* object name */
575 @REPLY
576 obj_handle_t handle; /* handle to the semaphore */
577 @END
580 /* Release a semaphore */
581 @REQ(release_semaphore)
582 obj_handle_t handle; /* handle to the semaphore */
583 unsigned int count; /* count to add to semaphore */
584 @REPLY
585 unsigned int prev_count; /* previous semaphore count */
586 @END
589 /* Open a semaphore */
590 @REQ(open_semaphore)
591 unsigned int access; /* wanted access rights */
592 int inherit; /* inherit flag */
593 VARARG(name,unicode_str); /* object name */
594 @REPLY
595 obj_handle_t handle; /* handle to the semaphore */
596 @END
599 /* Create a file */
600 @REQ(create_file)
601 unsigned int access; /* wanted access rights */
602 int inherit; /* inherit flag */
603 unsigned int sharing; /* sharing flags */
604 int create; /* file create action */
605 unsigned int options; /* file options */
606 unsigned int attrs; /* file attributes for creation */
607 VARARG(filename,string); /* file name */
608 @REPLY
609 obj_handle_t handle; /* handle to the file */
610 @END
613 /* Allocate a file handle for a Unix fd */
614 @REQ(alloc_file_handle)
615 unsigned int access; /* wanted access rights */
616 int inherit; /* inherit flag */
617 int fd; /* file descriptor on the client side */
618 @REPLY
619 obj_handle_t handle; /* handle to the file */
620 @END
623 /* Get a Unix fd to access a file */
624 @REQ(get_handle_fd)
625 obj_handle_t handle; /* handle to the file */
626 unsigned int access; /* wanted access rights */
627 @REPLY
628 int fd; /* file descriptor */
629 int flags; /* file read/write flags (see below) */
630 @END
631 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
632 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
633 #define FD_FLAG_RECV_SHUTDOWN 0x04
634 #define FD_FLAG_SEND_SHUTDOWN 0x08
635 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
636 * only handle available data (don't wait) */
639 /* Flush a file buffers */
640 @REQ(flush_file)
641 obj_handle_t handle; /* handle to the file */
642 @REPLY
643 obj_handle_t event; /* event set when finished */
644 @END
647 /* Lock a region of a file */
648 @REQ(lock_file)
649 obj_handle_t handle; /* handle to the file */
650 unsigned int offset_low; /* offset of start of lock */
651 unsigned int offset_high; /* offset of start of lock */
652 unsigned int count_low; /* count of bytes to lock */
653 unsigned int count_high; /* count of bytes to lock */
654 int shared; /* shared or exclusive lock? */
655 int wait; /* do we want to wait? */
656 @REPLY
657 obj_handle_t handle; /* handle to wait on */
658 int overlapped; /* is it an overlapped I/O handle? */
659 @END
662 /* Unlock a region of a file */
663 @REQ(unlock_file)
664 obj_handle_t handle; /* handle to the file */
665 unsigned int offset_low; /* offset of start of unlock */
666 unsigned int offset_high; /* offset of start of unlock */
667 unsigned int count_low; /* count of bytes to unlock */
668 unsigned int count_high; /* count of bytes to unlock */
669 @END
672 /* Create a socket */
673 @REQ(create_socket)
674 unsigned int access; /* wanted access rights */
675 int inherit; /* inherit flag */
676 int family; /* family, see socket manpage */
677 int type; /* type, see socket manpage */
678 int protocol; /* protocol, see socket manpage */
679 unsigned int flags; /* socket flags */
680 @REPLY
681 obj_handle_t handle; /* handle to the new socket */
682 @END
685 /* Accept a socket */
686 @REQ(accept_socket)
687 obj_handle_t lhandle; /* handle to the listening socket */
688 unsigned int access; /* wanted access rights */
689 int inherit; /* inherit flag */
690 @REPLY
691 obj_handle_t handle; /* handle to the new socket */
692 @END
695 /* Set socket event parameters */
696 @REQ(set_socket_event)
697 obj_handle_t handle; /* handle to the socket */
698 unsigned int mask; /* event mask */
699 obj_handle_t event; /* event object */
700 user_handle_t window; /* window to send the message to */
701 unsigned int msg; /* message to send */
702 @END
705 /* Get socket event parameters */
706 @REQ(get_socket_event)
707 obj_handle_t handle; /* handle to the socket */
708 int service; /* clear pending? */
709 obj_handle_t c_event; /* event to clear */
710 @REPLY
711 unsigned int mask; /* event mask */
712 unsigned int pmask; /* pending events */
713 unsigned int state; /* status bits */
714 VARARG(errors,ints); /* event errors */
715 @END
718 /* Reenable pending socket events */
719 @REQ(enable_socket_event)
720 obj_handle_t handle; /* handle to the socket */
721 unsigned int mask; /* events to re-enable */
722 unsigned int sstate; /* status bits to set */
723 unsigned int cstate; /* status bits to clear */
724 @END
726 @REQ(set_socket_deferred)
727 obj_handle_t handle; /* handle to the socket */
728 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
729 @END
731 /* Allocate a console (only used by a console renderer) */
732 @REQ(alloc_console)
733 unsigned int access; /* wanted access rights */
734 int inherit; /* inherit flag */
735 process_id_t pid; /* pid of process which shall be attached to the console */
736 @REPLY
737 obj_handle_t handle_in; /* handle to console input */
738 obj_handle_t event; /* handle to renderer events change notification */
739 @END
742 /* Free the console of the current process */
743 @REQ(free_console)
744 @END
747 #define CONSOLE_RENDERER_NONE_EVENT 0x00
748 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
749 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
750 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
751 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
752 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
753 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
754 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
755 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
756 struct console_renderer_event
758 short event;
759 union
761 struct update
763 short top;
764 short bottom;
765 } update;
766 struct resize
768 short width;
769 short height;
770 } resize;
771 struct cursor_pos
773 short x;
774 short y;
775 } cursor_pos;
776 struct cursor_geom
778 short visible;
779 short size;
780 } cursor_geom;
781 struct display
783 short left;
784 short top;
785 short width;
786 short height;
787 } display;
788 } u;
791 /* retrieve console events for the renderer */
792 @REQ(get_console_renderer_events)
793 obj_handle_t handle; /* handle to console input events */
794 @REPLY
795 VARARG(data,bytes); /* the various console_renderer_events */
796 @END
799 /* Open a handle to the process console */
800 @REQ(open_console)
801 int from; /* 0 (resp 1) input (resp output) of current process console */
802 /* otherwise console_in handle to get active screen buffer? */
803 unsigned int access; /* wanted access rights */
804 int inherit; /* inherit flag */
805 int share; /* share mask (only for output handles) */
806 @REPLY
807 obj_handle_t handle; /* handle to the console */
808 @END
811 /* Get the input queue wait event */
812 @REQ(get_console_wait_event)
813 @REPLY
814 obj_handle_t handle;
815 @END
817 /* Get a console mode (input or output) */
818 @REQ(get_console_mode)
819 obj_handle_t handle; /* handle to the console */
820 @REPLY
821 int mode; /* console mode */
822 @END
825 /* Set a console mode (input or output) */
826 @REQ(set_console_mode)
827 obj_handle_t handle; /* handle to the console */
828 int mode; /* console mode */
829 @END
832 /* Set info about a console (input only) */
833 @REQ(set_console_input_info)
834 obj_handle_t handle; /* handle to console input, or 0 for process' console */
835 int mask; /* setting mask (see below) */
836 obj_handle_t active_sb; /* active screen buffer */
837 int history_mode; /* whether we duplicate lines in history */
838 int history_size; /* number of lines in history */
839 int edition_mode; /* index to the edition mode flavors */
840 VARARG(title,unicode_str); /* console title */
841 @END
842 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
843 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
844 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
845 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
846 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
849 /* Get info about a console (input only) */
850 @REQ(get_console_input_info)
851 obj_handle_t handle; /* handle to console input, or 0 for process' console */
852 @REPLY
853 int history_mode; /* whether we duplicate lines in history */
854 int history_size; /* number of lines in history */
855 int history_index; /* number of used lines in history */
856 int edition_mode; /* index to the edition mode flavors */
857 VARARG(title,unicode_str); /* console title */
858 @END
861 /* appends a string to console's history */
862 @REQ(append_console_input_history)
863 obj_handle_t handle; /* handle to console input, or 0 for process' console */
864 VARARG(line,unicode_str); /* line to add */
865 @END
868 /* appends a string to console's history */
869 @REQ(get_console_input_history)
870 obj_handle_t handle; /* handle to console input, or 0 for process' console */
871 int index; /* index to get line from */
872 @REPLY
873 int total; /* total length of line in Unicode chars */
874 VARARG(line,unicode_str); /* line to add */
875 @END
878 /* creates a new screen buffer on process' console */
879 @REQ(create_console_output)
880 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
881 int access; /* wanted access rights */
882 int share; /* sharing credentials */
883 int inherit; /* inherit flag */
884 @REPLY
885 obj_handle_t handle_out; /* handle to the screen buffer */
886 @END
889 /* Set info about a console (output only) */
890 @REQ(set_console_output_info)
891 obj_handle_t handle; /* handle to the console */
892 int mask; /* setting mask (see below) */
893 short int cursor_size; /* size of cursor (percentage filled) */
894 short int cursor_visible;/* cursor visibility flag */
895 short int cursor_x; /* position of cursor (x, y) */
896 short int cursor_y;
897 short int width; /* width of the screen buffer */
898 short int height; /* height of the screen buffer */
899 short int attr; /* default attribute */
900 short int win_left; /* window actually displayed by renderer */
901 short int win_top; /* the rect area is expressed withing the */
902 short int win_right; /* boundaries of the screen buffer */
903 short int win_bottom;
904 short int max_width; /* maximum size (width x height) for the window */
905 short int max_height;
906 @END
907 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
908 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
909 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
910 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
911 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
912 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
915 /* Get info about a console (output only) */
916 @REQ(get_console_output_info)
917 obj_handle_t handle; /* handle to the console */
918 @REPLY
919 short int cursor_size; /* size of cursor (percentage filled) */
920 short int cursor_visible;/* cursor visibility flag */
921 short int cursor_x; /* position of cursor (x, y) */
922 short int cursor_y;
923 short int width; /* width of the screen buffer */
924 short int height; /* height of the screen buffer */
925 short int attr; /* default attribute */
926 short int win_left; /* window actually displayed by renderer */
927 short int win_top; /* the rect area is expressed withing the */
928 short int win_right; /* boundaries of the screen buffer */
929 short int win_bottom;
930 short int max_width; /* maximum size (width x height) for the window */
931 short int max_height;
932 @END
934 /* Add input records to a console input queue */
935 @REQ(write_console_input)
936 obj_handle_t handle; /* handle to the console input */
937 VARARG(rec,input_records); /* input records */
938 @REPLY
939 int written; /* number of records written */
940 @END
943 /* Fetch input records from a console input queue */
944 @REQ(read_console_input)
945 obj_handle_t handle; /* handle to the console input */
946 int flush; /* flush the retrieved records from the queue? */
947 @REPLY
948 int read; /* number of records read */
949 VARARG(rec,input_records); /* input records */
950 @END
953 /* write data (chars and/or attributes) in a screen buffer */
954 @REQ(write_console_output)
955 obj_handle_t handle; /* handle to the console output */
956 int x; /* position where to start writing */
957 int y;
958 int mode; /* char info (see below) */
959 int wrap; /* wrap around at end of line? */
960 VARARG(data,bytes); /* info to write */
961 @REPLY
962 int written; /* number of char infos actually written */
963 int width; /* width of screen buffer */
964 int height; /* height of screen buffer */
965 @END
966 enum char_info_mode
968 CHAR_INFO_MODE_TEXT, /* characters only */
969 CHAR_INFO_MODE_ATTR, /* attributes only */
970 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
971 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
975 /* fill a screen buffer with constant data (chars and/or attributes) */
976 @REQ(fill_console_output)
977 obj_handle_t handle; /* handle to the console output */
978 int x; /* position where to start writing */
979 int y;
980 int mode; /* char info mode */
981 int count; /* number to write */
982 int wrap; /* wrap around at end of line? */
983 char_info_t data; /* data to write */
984 @REPLY
985 int written; /* number of char infos actually written */
986 @END
989 /* read data (chars and/or attributes) from a screen buffer */
990 @REQ(read_console_output)
991 obj_handle_t handle; /* handle to the console output */
992 int x; /* position (x,y) where to start reading */
993 int y;
994 int mode; /* char info mode */
995 int wrap; /* wrap around at end of line? */
996 @REPLY
997 int width; /* width of screen buffer */
998 int height; /* height of screen buffer */
999 VARARG(data,bytes);
1000 @END
1003 /* move a rect (of data) in screen buffer content */
1004 @REQ(move_console_output)
1005 obj_handle_t handle; /* handle to the console output */
1006 short int x_src; /* position (x, y) of rect to start moving from */
1007 short int y_src;
1008 short int x_dst; /* position (x, y) of rect to move to */
1009 short int y_dst;
1010 short int w; /* size of the rect (width, height) to move */
1011 short int h;
1012 @END
1015 /* Sends a signal to a process group */
1016 @REQ(send_console_signal)
1017 int signal; /* the signal to send */
1018 process_id_t group_id; /* the group to send the signal to */
1019 @END
1022 /* Create a change notification */
1023 @REQ(create_change_notification)
1024 obj_handle_t handle; /* handle to the directory */
1025 int subtree; /* watch all the subtree */
1026 unsigned int filter; /* notification filter */
1027 @REPLY
1028 obj_handle_t handle; /* handle to the change notification */
1029 @END
1032 /* Move to the next change notification */
1033 @REQ(next_change_notification)
1034 obj_handle_t handle; /* handle to the change notification */
1035 @END
1037 /* Create a file mapping */
1038 @REQ(create_mapping)
1039 int size_high; /* mapping size */
1040 int size_low; /* mapping size */
1041 int protect; /* protection flags (see below) */
1042 unsigned int access; /* wanted access rights */
1043 int inherit; /* inherit flag */
1044 obj_handle_t file_handle; /* file handle */
1045 VARARG(name,unicode_str); /* object name */
1046 @REPLY
1047 obj_handle_t handle; /* handle to the mapping */
1048 @END
1049 /* protection flags */
1050 #define VPROT_READ 0x01
1051 #define VPROT_WRITE 0x02
1052 #define VPROT_EXEC 0x04
1053 #define VPROT_WRITECOPY 0x08
1054 #define VPROT_GUARD 0x10
1055 #define VPROT_NOCACHE 0x20
1056 #define VPROT_COMMITTED 0x40
1057 #define VPROT_IMAGE 0x80
1060 /* Open a mapping */
1061 @REQ(open_mapping)
1062 unsigned int access; /* wanted access rights */
1063 int inherit; /* inherit flag */
1064 VARARG(name,unicode_str); /* object name */
1065 @REPLY
1066 obj_handle_t handle; /* handle to the mapping */
1067 @END
1070 /* Get information about a file mapping */
1071 @REQ(get_mapping_info)
1072 obj_handle_t handle; /* handle to the mapping */
1073 @REPLY
1074 int size_high; /* mapping size */
1075 int size_low; /* mapping size */
1076 int protect; /* protection flags */
1077 int header_size; /* header size (for VPROT_IMAGE mapping) */
1078 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1079 obj_handle_t shared_file; /* shared mapping file handle */
1080 int shared_size; /* shared mapping size */
1081 @END
1084 #define SNAP_HEAPLIST 0x00000001
1085 #define SNAP_PROCESS 0x00000002
1086 #define SNAP_THREAD 0x00000004
1087 #define SNAP_MODULE 0x00000008
1088 /* Create a snapshot */
1089 @REQ(create_snapshot)
1090 int inherit; /* inherit flag */
1091 int flags; /* snapshot flags (SNAP_*) */
1092 process_id_t pid; /* process id */
1093 @REPLY
1094 obj_handle_t handle; /* handle to the snapshot */
1095 @END
1098 /* Get the next process from a snapshot */
1099 @REQ(next_process)
1100 obj_handle_t handle; /* handle to the snapshot */
1101 int reset; /* reset snapshot position? */
1102 @REPLY
1103 int count; /* process usage count */
1104 process_id_t pid; /* process id */
1105 process_id_t ppid; /* parent process id */
1106 void* heap; /* heap base */
1107 void* module; /* main module */
1108 int threads; /* number of threads */
1109 int priority; /* process priority */
1110 int handles; /* number of handles */
1111 VARARG(filename,unicode_str); /* file name of main exe */
1112 @END
1115 /* Get the next thread from a snapshot */
1116 @REQ(next_thread)
1117 obj_handle_t handle; /* handle to the snapshot */
1118 int reset; /* reset snapshot position? */
1119 @REPLY
1120 int count; /* thread usage count */
1121 process_id_t pid; /* process id */
1122 thread_id_t tid; /* thread id */
1123 int base_pri; /* base priority */
1124 int delta_pri; /* delta priority */
1125 @END
1128 /* Get the next module from a snapshot */
1129 @REQ(next_module)
1130 obj_handle_t handle; /* handle to the snapshot */
1131 int reset; /* reset snapshot position? */
1132 @REPLY
1133 process_id_t pid; /* process id */
1134 void* base; /* module base address */
1135 size_t size; /* module size */
1136 VARARG(filename,unicode_str); /* file name of module */
1137 @END
1140 /* Wait for a debug event */
1141 @REQ(wait_debug_event)
1142 int get_handle; /* should we alloc a handle for waiting? */
1143 @REPLY
1144 process_id_t pid; /* process id */
1145 thread_id_t tid; /* thread id */
1146 obj_handle_t wait; /* wait handle if no event ready */
1147 VARARG(event,debug_event); /* debug event data */
1148 @END
1151 /* Queue an exception event */
1152 @REQ(queue_exception_event)
1153 int first; /* first chance exception? */
1154 VARARG(record,exc_event); /* thread context followed by exception record */
1155 @REPLY
1156 obj_handle_t handle; /* handle to the queued event */
1157 @END
1160 /* Retrieve the status of an exception event */
1161 @REQ(get_exception_status)
1162 obj_handle_t handle; /* handle to the queued event */
1163 @REPLY
1164 int status; /* event continuation status */
1165 VARARG(context,context); /* modified thread context */
1166 @END
1169 /* Send an output string to the debugger */
1170 @REQ(output_debug_string)
1171 void* string; /* string to display (in debugged process address space) */
1172 int unicode; /* is it Unicode? */
1173 int length; /* string length */
1174 @END
1177 /* Continue a debug event */
1178 @REQ(continue_debug_event)
1179 process_id_t pid; /* process id to continue */
1180 thread_id_t tid; /* thread id to continue */
1181 int status; /* continuation status */
1182 @END
1185 /* Start/stop debugging an existing process */
1186 @REQ(debug_process)
1187 process_id_t pid; /* id of the process to debug */
1188 int attach; /* 1=attaching / 0=detaching from the process */
1189 @END
1192 /* Simulate a breakpoint in a process */
1193 @REQ(debug_break)
1194 obj_handle_t handle; /* process handle */
1195 @REPLY
1196 int self; /* was it the caller itself? */
1197 @END
1200 /* Set debugger kill on exit flag */
1201 @REQ(set_debugger_kill_on_exit)
1202 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1203 @END
1206 /* Read data from a process address space */
1207 @REQ(read_process_memory)
1208 obj_handle_t handle; /* process handle */
1209 void* addr; /* addr to read from */
1210 @REPLY
1211 VARARG(data,bytes); /* result data */
1212 @END
1215 /* Write data to a process address space */
1216 @REQ(write_process_memory)
1217 obj_handle_t handle; /* process handle */
1218 void* addr; /* addr to write to (must be int-aligned) */
1219 unsigned int first_mask; /* mask for first word */
1220 unsigned int last_mask; /* mask for last word */
1221 VARARG(data,bytes); /* data to write */
1222 @END
1225 /* Create a registry key */
1226 @REQ(create_key)
1227 obj_handle_t parent; /* handle to the parent key */
1228 unsigned int access; /* desired access rights */
1229 unsigned int options; /* creation options */
1230 time_t modif; /* last modification time */
1231 size_t namelen; /* length of key name in bytes */
1232 VARARG(name,unicode_str,namelen); /* key name */
1233 VARARG(class,unicode_str); /* class name */
1234 @REPLY
1235 obj_handle_t hkey; /* handle to the created key */
1236 int created; /* has it been newly created? */
1237 @END
1239 /* Open a registry key */
1240 @REQ(open_key)
1241 obj_handle_t parent; /* handle to the parent key */
1242 unsigned int access; /* desired access rights */
1243 VARARG(name,unicode_str); /* key name */
1244 @REPLY
1245 obj_handle_t hkey; /* handle to the open key */
1246 @END
1249 /* Delete a registry key */
1250 @REQ(delete_key)
1251 obj_handle_t hkey; /* handle to the key */
1252 @END
1255 /* Flush a registry key */
1256 @REQ(flush_key)
1257 obj_handle_t hkey; /* handle to the key */
1258 @END
1261 /* Enumerate registry subkeys */
1262 @REQ(enum_key)
1263 obj_handle_t hkey; /* handle to registry key */
1264 int index; /* index of subkey (or -1 for current key) */
1265 int info_class; /* requested information class */
1266 @REPLY
1267 int subkeys; /* number of subkeys */
1268 int max_subkey; /* longest subkey name */
1269 int max_class; /* longest class name */
1270 int values; /* number of values */
1271 int max_value; /* longest value name */
1272 int max_data; /* longest value data */
1273 time_t modif; /* last modification time */
1274 size_t total; /* total length needed for full name and class */
1275 size_t namelen; /* length of key name in bytes */
1276 VARARG(name,unicode_str,namelen); /* key name */
1277 VARARG(class,unicode_str); /* class name */
1278 @END
1281 /* Set a value of a registry key */
1282 @REQ(set_key_value)
1283 obj_handle_t hkey; /* handle to registry key */
1284 int type; /* value type */
1285 size_t namelen; /* length of value name in bytes */
1286 VARARG(name,unicode_str,namelen); /* value name */
1287 VARARG(data,bytes); /* value data */
1288 @END
1291 /* Retrieve the value of a registry key */
1292 @REQ(get_key_value)
1293 obj_handle_t hkey; /* handle to registry key */
1294 VARARG(name,unicode_str); /* value name */
1295 @REPLY
1296 int type; /* value type */
1297 size_t total; /* total length needed for data */
1298 VARARG(data,bytes); /* value data */
1299 @END
1302 /* Enumerate a value of a registry key */
1303 @REQ(enum_key_value)
1304 obj_handle_t hkey; /* handle to registry key */
1305 int index; /* value index */
1306 int info_class; /* requested information class */
1307 @REPLY
1308 int type; /* value type */
1309 size_t total; /* total length needed for full name and data */
1310 size_t namelen; /* length of value name in bytes */
1311 VARARG(name,unicode_str,namelen); /* value name */
1312 VARARG(data,bytes); /* value data */
1313 @END
1316 /* Delete a value of a registry key */
1317 @REQ(delete_key_value)
1318 obj_handle_t hkey; /* handle to registry key */
1319 VARARG(name,unicode_str); /* value name */
1320 @END
1323 /* Load a registry branch from a file */
1324 @REQ(load_registry)
1325 obj_handle_t hkey; /* root key to load to */
1326 obj_handle_t file; /* file to load from */
1327 VARARG(name,unicode_str); /* subkey name */
1328 @END
1331 /* UnLoad a registry branch from a file */
1332 @REQ(unload_registry)
1333 obj_handle_t hkey; /* root key to unload to */
1334 @END
1337 /* Save a registry branch to a file */
1338 @REQ(save_registry)
1339 obj_handle_t hkey; /* key to save */
1340 obj_handle_t file; /* file to save to */
1341 @END
1344 /* Load the user registry files */
1345 @REQ(load_user_registries)
1346 obj_handle_t hkey; /* key for HKCU */
1347 int saving; /* new saving level */
1348 int period; /* duration between periodic saves (milliseconds) */
1349 @END
1352 /* Add a registry key change notification */
1353 @REQ(set_registry_notification)
1354 obj_handle_t hkey; /* key to watch for changes */
1355 obj_handle_t event; /* event to set */
1356 int subtree; /* should we watch the whole subtree? */
1357 unsigned int filter; /* things to watch */
1358 @END
1361 /* Create a waitable timer */
1362 @REQ(create_timer)
1363 unsigned int access; /* wanted access rights */
1364 int inherit; /* inherit flag */
1365 int manual; /* manual reset */
1366 VARARG(name,unicode_str); /* object name */
1367 @REPLY
1368 obj_handle_t handle; /* handle to the timer */
1369 @END
1372 /* Open a waitable timer */
1373 @REQ(open_timer)
1374 unsigned int access; /* wanted access rights */
1375 int inherit; /* inherit flag */
1376 VARARG(name,unicode_str); /* object name */
1377 @REPLY
1378 obj_handle_t handle; /* handle to the timer */
1379 @END
1381 /* Set a waitable timer */
1382 @REQ(set_timer)
1383 obj_handle_t handle; /* handle to the timer */
1384 abs_time_t expire; /* next expiration absolute time */
1385 int period; /* timer period in ms */
1386 void* callback; /* callback function */
1387 void* arg; /* callback argument */
1388 @REPLY
1389 int signaled; /* was the timer signaled before this call ? */
1390 @END
1392 /* Cancel a waitable timer */
1393 @REQ(cancel_timer)
1394 obj_handle_t handle; /* handle to the timer */
1395 @REPLY
1396 int signaled; /* was the timer signaled before this calltime ? */
1397 @END
1399 /* Get information on a waitable timer */
1400 @REQ(get_timer_info)
1401 obj_handle_t handle; /* handle to the timer */
1402 @REPLY
1403 abs_time_t when; /* absolute time when the timer next expires */
1404 int signaled; /* is the timer signaled? */
1405 @END
1408 /* Retrieve the current context of a thread */
1409 @REQ(get_thread_context)
1410 obj_handle_t handle; /* thread handle */
1411 unsigned int flags; /* context flags */
1412 @REPLY
1413 VARARG(context,context); /* thread context */
1414 @END
1417 /* Set the current context of a thread */
1418 @REQ(set_thread_context)
1419 obj_handle_t handle; /* thread handle */
1420 unsigned int flags; /* context flags */
1421 VARARG(context,context); /* thread context */
1422 @END
1425 /* Fetch a selector entry for a thread */
1426 @REQ(get_selector_entry)
1427 obj_handle_t handle; /* thread handle */
1428 int entry; /* LDT entry */
1429 @REPLY
1430 unsigned int base; /* selector base */
1431 unsigned int limit; /* selector limit */
1432 unsigned char flags; /* selector flags */
1433 @END
1436 /* Add an atom */
1437 @REQ(add_atom)
1438 obj_handle_t table; /* which table to add atom to */
1439 VARARG(name,unicode_str); /* atom name */
1440 @REPLY
1441 atom_t atom; /* resulting atom */
1442 @END
1445 /* Delete an atom */
1446 @REQ(delete_atom)
1447 obj_handle_t table; /* which table to delete atom from */
1448 atom_t atom; /* atom handle */
1449 @END
1452 /* Find an atom */
1453 @REQ(find_atom)
1454 obj_handle_t table; /* which table to find atom from */
1455 VARARG(name,unicode_str); /* atom name */
1456 @REPLY
1457 atom_t atom; /* atom handle */
1458 @END
1461 /* Get information about an atom */
1462 @REQ(get_atom_information)
1463 obj_handle_t table; /* which table to find atom from */
1464 atom_t atom; /* atom handle */
1465 @REPLY
1466 int count; /* atom lock count */
1467 int pinned; /* whether the atom has been pinned */
1468 VARARG(name,unicode_str); /* atom name */
1469 @END
1472 /* Set information about an atom */
1473 @REQ(set_atom_information)
1474 obj_handle_t table; /* which table to find atom from */
1475 atom_t atom; /* atom handle */
1476 int pinned; /* whether to bump atom information */
1477 @END
1480 /* Empty an atom table */
1481 @REQ(empty_atom_table)
1482 obj_handle_t table; /* which table to find atom from */
1483 int if_pinned; /* whether to delete pinned atoms */
1484 @END
1487 /* Init an atom table */
1488 @REQ(init_atom_table)
1489 int entries; /* number of entries (only for local) */
1490 @REPLY
1491 obj_handle_t table; /* handle to the atom table */
1492 @END
1495 /* Get the message queue of the current thread */
1496 @REQ(get_msg_queue)
1497 @REPLY
1498 obj_handle_t handle; /* handle to the queue */
1499 @END
1502 /* Set the current message queue wakeup mask */
1503 @REQ(set_queue_mask)
1504 unsigned int wake_mask; /* wakeup bits mask */
1505 unsigned int changed_mask; /* changed bits mask */
1506 int skip_wait; /* will we skip waiting if signaled? */
1507 @REPLY
1508 unsigned int wake_bits; /* current wake bits */
1509 unsigned int changed_bits; /* current changed bits */
1510 @END
1513 /* Get the current message queue status */
1514 @REQ(get_queue_status)
1515 int clear; /* should we clear the change bits? */
1516 @REPLY
1517 unsigned int wake_bits; /* wake bits */
1518 unsigned int changed_bits; /* changed bits since last time */
1519 @END
1522 /* Wait for a process to start waiting on input */
1523 @REQ(wait_input_idle)
1524 obj_handle_t handle; /* process handle */
1525 int timeout; /* timeout */
1526 @REPLY
1527 obj_handle_t event; /* handle to idle event */
1528 @END
1531 /* Send a message to a thread queue */
1532 @REQ(send_message)
1533 thread_id_t id; /* thread id */
1534 int type; /* message type (see below) */
1535 int flags; /* message flags (see below) */
1536 user_handle_t win; /* window handle */
1537 unsigned int msg; /* message code */
1538 unsigned int wparam; /* parameters */
1539 unsigned int lparam; /* parameters */
1540 int x; /* x position */
1541 int y; /* y position */
1542 unsigned int time; /* message time */
1543 unsigned int info; /* extra info */
1544 int timeout; /* timeout for reply */
1545 void* callback; /* callback address */
1546 VARARG(data,bytes); /* message data for sent messages */
1547 @END
1549 enum message_type
1551 MSG_ASCII, /* Ascii message (from SendMessageA) */
1552 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1553 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1554 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1555 MSG_CALLBACK_RESULT,/* result of a callback message */
1556 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1557 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1558 MSG_HARDWARE, /* hardware message */
1559 MSG_WINEVENT /* winevent message */
1561 #define SEND_MSG_ABORT_IF_HUNG 0x01
1564 /* Get a message from the current queue */
1565 @REQ(get_message)
1566 int flags; /* see below */
1567 user_handle_t get_win; /* window handle to get */
1568 unsigned int get_first; /* first message code to get */
1569 unsigned int get_last; /* last message code to get */
1570 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1571 @REPLY
1572 int type; /* message type */
1573 user_handle_t win; /* window handle */
1574 unsigned int msg; /* message code */
1575 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1576 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1577 int x; /* x position */
1578 int y; /* y position */
1579 user_handle_t hook; /* winevent hook handle */
1580 void* hook_proc; /* winevent hook proc address */
1581 unsigned int time; /* message time */
1582 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1583 unsigned int hw_id; /* id if hardware message */
1584 unsigned int active_hooks; /* active hooks bitmap */
1585 size_t total; /* total size of extra data */
1586 VARARG(data,bytes); /* message data for sent messages */
1587 @END
1588 #define GET_MSG_REMOVE 1 /* remove the message */
1589 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1591 /* Reply to a sent message */
1592 @REQ(reply_message)
1593 unsigned int result; /* message result */
1594 int remove; /* should we remove the message? */
1595 VARARG(data,bytes); /* message data for sent messages */
1596 @END
1599 /* Accept the current hardware message */
1600 @REQ(accept_hardware_message)
1601 unsigned int hw_id; /* id of the hardware message */
1602 int remove; /* should we remove the message? */
1603 user_handle_t new_win; /* new destination window for current message */
1604 @END
1607 /* Retrieve the reply for the last message sent */
1608 @REQ(get_message_reply)
1609 int cancel; /* cancel message if not ready? */
1610 @REPLY
1611 unsigned int result; /* message result */
1612 VARARG(data,bytes); /* message data for sent messages */
1613 @END
1616 /* Set a window timer */
1617 @REQ(set_win_timer)
1618 user_handle_t win; /* window handle */
1619 unsigned int msg; /* message to post */
1620 unsigned int id; /* timer id */
1621 unsigned int rate; /* timer rate in ms */
1622 unsigned int lparam; /* message lparam (callback proc) */
1623 @REPLY
1624 unsigned int id; /* timer id */
1625 @END
1628 /* Kill a window timer */
1629 @REQ(kill_win_timer)
1630 user_handle_t win; /* window handle */
1631 unsigned int msg; /* message to post */
1632 unsigned int id; /* timer id */
1633 @END
1636 /* Retrieve info about a serial port */
1637 @REQ(get_serial_info)
1638 obj_handle_t handle; /* handle to comm port */
1639 @REPLY
1640 unsigned int readinterval;
1641 unsigned int readconst;
1642 unsigned int readmult;
1643 unsigned int writeconst;
1644 unsigned int writemult;
1645 unsigned int eventmask;
1646 unsigned int commerror;
1647 @END
1650 /* Set info about a serial port */
1651 @REQ(set_serial_info)
1652 obj_handle_t handle; /* handle to comm port */
1653 int flags; /* bitmask to set values (see below) */
1654 unsigned int readinterval;
1655 unsigned int readconst;
1656 unsigned int readmult;
1657 unsigned int writeconst;
1658 unsigned int writemult;
1659 unsigned int eventmask;
1660 unsigned int commerror;
1661 @END
1662 #define SERIALINFO_SET_TIMEOUTS 0x01
1663 #define SERIALINFO_SET_MASK 0x02
1664 #define SERIALINFO_SET_ERROR 0x04
1667 /* Create an async I/O */
1668 @REQ(register_async)
1669 obj_handle_t handle; /* handle to comm port, socket or file */
1670 int type; /* type of queue to look after */
1671 void* io_apc; /* APC routine to queue upon end of async */
1672 void* io_sb; /* I/O status block (unique across all async on this handle) */
1673 void* io_user; /* data to pass back to caller */
1674 int count; /* count - usually # of bytes to be read/written */
1675 @END
1676 #define ASYNC_TYPE_READ 0x01
1677 #define ASYNC_TYPE_WRITE 0x02
1678 #define ASYNC_TYPE_WAIT 0x03
1681 /* Cancel all async op on a fd */
1682 @REQ(cancel_async)
1683 obj_handle_t handle; /* handle to comm port, socket or file */
1684 @END
1687 /* Create a named pipe */
1688 @REQ(create_named_pipe)
1689 unsigned int options;
1690 unsigned int flags;
1691 unsigned int maxinstances;
1692 unsigned int outsize;
1693 unsigned int insize;
1694 unsigned int timeout;
1695 int inherit; /* inherit flag */
1696 VARARG(name,unicode_str); /* pipe name */
1697 @REPLY
1698 obj_handle_t handle; /* handle to the pipe */
1699 @END
1701 /* flags in create_named_pipe and get_named_pipe_info */
1702 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1703 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1704 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1707 /* Open an existing named pipe */
1708 @REQ(open_named_pipe)
1709 unsigned int access;
1710 unsigned int flags; /* file flags */
1711 int inherit; /* inherit flag */
1712 VARARG(name,unicode_str); /* pipe name */
1713 @REPLY
1714 obj_handle_t handle; /* handle to the pipe */
1715 @END
1718 /* Connect to a named pipe */
1719 @REQ(connect_named_pipe)
1720 obj_handle_t handle;
1721 void* overlapped;
1722 void* func;
1723 @END
1726 /* Wait for a named pipe */
1727 @REQ(wait_named_pipe)
1728 unsigned int timeout;
1729 void* overlapped;
1730 void* func;
1731 VARARG(name,unicode_str); /* pipe name */
1732 @END
1735 /* Disconnect a named pipe */
1736 @REQ(disconnect_named_pipe)
1737 obj_handle_t handle;
1738 @REPLY
1739 int fd; /* associated fd to close */
1740 @END
1743 @REQ(get_named_pipe_info)
1744 obj_handle_t handle;
1745 @REPLY
1746 unsigned int flags;
1747 unsigned int maxinstances;
1748 unsigned int outsize;
1749 unsigned int insize;
1750 @END
1753 /* Create a window */
1754 @REQ(create_window)
1755 user_handle_t parent; /* parent window */
1756 user_handle_t owner; /* owner window */
1757 atom_t atom; /* class atom */
1758 void* instance; /* module instance */
1759 @REPLY
1760 user_handle_t handle; /* created window */
1761 int extra; /* number of extra bytes */
1762 void* class_ptr; /* pointer to class in client address space */
1763 @END
1766 /* Destroy a window */
1767 @REQ(destroy_window)
1768 user_handle_t handle; /* handle to the window */
1769 @END
1772 /* Set a window owner */
1773 @REQ(set_window_owner)
1774 user_handle_t handle; /* handle to the window */
1775 user_handle_t owner; /* new owner */
1776 @REPLY
1777 user_handle_t full_owner; /* full handle of new owner */
1778 user_handle_t prev_owner; /* full handle of previous owner */
1779 @END
1782 /* Get information from a window handle */
1783 @REQ(get_window_info)
1784 user_handle_t handle; /* handle to the window */
1785 @REPLY
1786 user_handle_t full_handle; /* full 32-bit handle */
1787 user_handle_t last_active; /* last active popup */
1788 process_id_t pid; /* process owning the window */
1789 thread_id_t tid; /* thread owning the window */
1790 atom_t atom; /* class atom */
1791 @END
1794 /* Set some information in a window */
1795 @REQ(set_window_info)
1796 user_handle_t handle; /* handle to the window */
1797 unsigned int flags; /* flags for fields to set (see below) */
1798 unsigned int style; /* window style */
1799 unsigned int ex_style; /* window extended style */
1800 unsigned int id; /* window id */
1801 void* instance; /* creator instance */
1802 void* user_data; /* user-specific data */
1803 int extra_offset; /* offset to set in extra bytes */
1804 size_t extra_size; /* size to set in extra bytes */
1805 unsigned int extra_value; /* value to set in extra bytes */
1806 @REPLY
1807 unsigned int old_style; /* old window style */
1808 unsigned int old_ex_style; /* old window extended style */
1809 unsigned int old_id; /* old window id */
1810 void* old_instance; /* old creator instance */
1811 void* old_user_data; /* old user-specific data */
1812 unsigned int old_extra_value; /* old value in extra bytes */
1813 @END
1814 #define SET_WIN_STYLE 0x01
1815 #define SET_WIN_EXSTYLE 0x02
1816 #define SET_WIN_ID 0x04
1817 #define SET_WIN_INSTANCE 0x08
1818 #define SET_WIN_USERDATA 0x10
1819 #define SET_WIN_EXTRA 0x20
1822 /* Set the parent of a window */
1823 @REQ(set_parent)
1824 user_handle_t handle; /* handle to the window */
1825 user_handle_t parent; /* handle to the parent */
1826 @REPLY
1827 user_handle_t old_parent; /* old parent window */
1828 user_handle_t full_parent; /* full handle of new parent */
1829 @END
1832 /* Get a list of the window parents, up to the root of the tree */
1833 @REQ(get_window_parents)
1834 user_handle_t handle; /* handle to the window */
1835 @REPLY
1836 int count; /* total count of parents */
1837 VARARG(parents,user_handles); /* parent handles */
1838 @END
1841 /* Get a list of the window children */
1842 @REQ(get_window_children)
1843 user_handle_t parent; /* parent window */
1844 atom_t atom; /* class atom for the listed children */
1845 thread_id_t tid; /* thread owning the listed children */
1846 @REPLY
1847 int count; /* total count of children */
1848 VARARG(children,user_handles); /* children handles */
1849 @END
1852 /* Get a list of the window children that contain a given point */
1853 @REQ(get_window_children_from_point)
1854 user_handle_t parent; /* parent window */
1855 int x; /* point in parent coordinates */
1856 int y;
1857 @REPLY
1858 int count; /* total count of children */
1859 VARARG(children,user_handles); /* children handles */
1860 @END
1863 /* Get window tree information from a window handle */
1864 @REQ(get_window_tree)
1865 user_handle_t handle; /* handle to the window */
1866 @REPLY
1867 user_handle_t parent; /* parent window */
1868 user_handle_t owner; /* owner window */
1869 user_handle_t next_sibling; /* next sibling in Z-order */
1870 user_handle_t prev_sibling; /* prev sibling in Z-order */
1871 user_handle_t first_sibling; /* first sibling in Z-order */
1872 user_handle_t last_sibling; /* last sibling in Z-order */
1873 user_handle_t first_child; /* first child */
1874 user_handle_t last_child; /* last child */
1875 @END
1877 /* Set the position and Z order of a window */
1878 @REQ(set_window_pos)
1879 user_handle_t handle; /* handle to the window */
1880 user_handle_t previous; /* previous window in Z order */
1881 unsigned int flags; /* SWP_* flags */
1882 rectangle_t window; /* window rectangle */
1883 rectangle_t client; /* client rectangle */
1884 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1885 @REPLY
1886 unsigned int new_style; /* new window style */
1887 @END
1890 /* Get the window and client rectangles of a window */
1891 @REQ(get_window_rectangles)
1892 user_handle_t handle; /* handle to the window */
1893 @REPLY
1894 rectangle_t window; /* window rectangle */
1895 rectangle_t visible; /* visible part of the window rectangle */
1896 rectangle_t client; /* client rectangle */
1897 @END
1900 /* Get the window text */
1901 @REQ(get_window_text)
1902 user_handle_t handle; /* handle to the window */
1903 @REPLY
1904 VARARG(text,unicode_str); /* window text */
1905 @END
1908 /* Set the window text */
1909 @REQ(set_window_text)
1910 user_handle_t handle; /* handle to the window */
1911 VARARG(text,unicode_str); /* window text */
1912 @END
1915 /* Get the coordinates offset between two windows */
1916 @REQ(get_windows_offset)
1917 user_handle_t from; /* handle to the first window */
1918 user_handle_t to; /* handle to the second window */
1919 @REPLY
1920 int x; /* x coordinate offset */
1921 int y; /* y coordinate offset */
1922 @END
1925 /* Get the visible region of a window */
1926 @REQ(get_visible_region)
1927 user_handle_t window; /* handle to the window */
1928 unsigned int flags; /* DCX flags */
1929 @REPLY
1930 user_handle_t top_win; /* top window to clip against */
1931 int top_org_x; /* top window visible rect origin in screen coords */
1932 int top_org_y;
1933 int win_org_x; /* window rect origin in screen coords */
1934 int win_org_y;
1935 size_t total_size; /* total size of the resulting region */
1936 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
1937 @END
1940 /* Get the window region */
1941 @REQ(get_window_region)
1942 user_handle_t window; /* handle to the window */
1943 @REPLY
1944 size_t total_size; /* total size of the resulting region */
1945 VARARG(region,rectangles); /* list of rectangles for the region */
1946 @END
1949 /* Set the window region */
1950 @REQ(set_window_region)
1951 user_handle_t window; /* handle to the window */
1952 VARARG(region,rectangles); /* list of rectangles for the region */
1953 @END
1956 /* Get the window update region */
1957 @REQ(get_update_region)
1958 user_handle_t window; /* handle to the window */
1959 user_handle_t from_child; /* child to start searching from */
1960 unsigned int flags; /* update flags (see below) */
1961 @REPLY
1962 user_handle_t child; /* child to repaint (or window itself) */
1963 unsigned int flags; /* resulting update flags (see below) */
1964 size_t total_size; /* total size of the resulting region */
1965 VARARG(region,rectangles); /* list of rectangles for the region */
1966 @END
1967 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
1968 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
1969 #define UPDATE_PAINT 0x04 /* get region for painting client area */
1970 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
1971 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
1972 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
1973 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
1976 /* Update the z order of a window so that a given rectangle is fully visible */
1977 @REQ(update_window_zorder)
1978 user_handle_t window; /* handle to the window */
1979 rectangle_t rect; /* rectangle that must be visible */
1980 @END
1983 /* Mark parts of a window as needing a redraw */
1984 @REQ(redraw_window)
1985 user_handle_t window; /* handle to the window */
1986 unsigned int flags; /* RDW_* flags */
1987 VARARG(region,rectangles); /* list of rectangles for the region */
1988 @END
1991 /* Set a window property */
1992 @REQ(set_window_property)
1993 user_handle_t window; /* handle to the window */
1994 atom_t atom; /* property atom (if no name specified) */
1995 obj_handle_t handle; /* handle to store */
1996 VARARG(name,unicode_str); /* property name */
1997 @END
2000 /* Remove a window property */
2001 @REQ(remove_window_property)
2002 user_handle_t window; /* handle to the window */
2003 atom_t atom; /* property atom (if no name specified) */
2004 VARARG(name,unicode_str); /* property name */
2005 @REPLY
2006 obj_handle_t handle; /* handle stored in property */
2007 @END
2010 /* Get a window property */
2011 @REQ(get_window_property)
2012 user_handle_t window; /* handle to the window */
2013 atom_t atom; /* property atom (if no name specified) */
2014 VARARG(name,unicode_str); /* property name */
2015 @REPLY
2016 obj_handle_t handle; /* handle stored in property */
2017 @END
2020 /* Get the list of properties of a window */
2021 @REQ(get_window_properties)
2022 user_handle_t window; /* handle to the window */
2023 @REPLY
2024 int total; /* total number of properties */
2025 VARARG(props,properties); /* list of properties */
2026 @END
2029 /* Create a window station */
2030 @REQ(create_winstation)
2031 unsigned int flags; /* window station flags */
2032 unsigned int access; /* wanted access rights */
2033 int inherit; /* inherit flag */
2034 VARARG(name,unicode_str); /* object name */
2035 @REPLY
2036 obj_handle_t handle; /* handle to the window station */
2037 @END
2040 /* Open a handle to a window station */
2041 @REQ(open_winstation)
2042 unsigned int access; /* wanted access rights */
2043 int inherit; /* inherit flag */
2044 VARARG(name,unicode_str); /* object name */
2045 @REPLY
2046 obj_handle_t handle; /* handle to the window station */
2047 @END
2050 /* Close a window station */
2051 @REQ(close_winstation)
2052 obj_handle_t handle; /* handle to the window station */
2053 @END
2056 /* Get the process current window station */
2057 @REQ(get_process_winstation)
2058 @REPLY
2059 obj_handle_t handle; /* handle to the window station */
2060 @END
2063 /* Set the process current window station */
2064 @REQ(set_process_winstation)
2065 obj_handle_t handle; /* handle to the window station */
2066 @END
2069 /* Create a desktop */
2070 @REQ(create_desktop)
2071 unsigned int flags; /* desktop flags */
2072 unsigned int access; /* wanted access rights */
2073 int inherit; /* inherit flag */
2074 VARARG(name,unicode_str); /* object name */
2075 @REPLY
2076 obj_handle_t handle; /* handle to the desktop */
2077 @END
2080 /* Open a handle to a desktop */
2081 @REQ(open_desktop)
2082 unsigned int flags; /* desktop flags */
2083 unsigned int access; /* wanted access rights */
2084 int inherit; /* inherit flag */
2085 VARARG(name,unicode_str); /* object name */
2086 @REPLY
2087 obj_handle_t handle; /* handle to the desktop */
2088 @END
2091 /* Close a desktop */
2092 @REQ(close_desktop)
2093 obj_handle_t handle; /* handle to the desktop */
2094 @END
2097 /* Get the thread current desktop */
2098 @REQ(get_thread_desktop)
2099 thread_id_t tid; /* thread id */
2100 @REPLY
2101 obj_handle_t handle; /* handle to the desktop */
2102 @END
2105 /* Set the thread current desktop */
2106 @REQ(set_thread_desktop)
2107 obj_handle_t handle; /* handle to the desktop */
2108 @END
2111 /* Get/set information about a user object (window station or desktop) */
2112 @REQ(set_user_object_info)
2113 obj_handle_t handle; /* handle to the object */
2114 unsigned int flags; /* information to set */
2115 unsigned int obj_flags; /* new object flags */
2116 @REPLY
2117 int is_desktop; /* is object a desktop? */
2118 unsigned int old_obj_flags; /* old object flags */
2119 VARARG(name,unicode_str); /* object name */
2120 @END
2121 #define SET_USER_OBJECT_FLAGS 1
2124 /* Attach (or detach) thread inputs */
2125 @REQ(attach_thread_input)
2126 thread_id_t tid_from; /* thread to be attached */
2127 thread_id_t tid_to; /* thread to which tid_from should be attached */
2128 int attach; /* is it an attach? */
2129 @END
2132 /* Get input data for a given thread */
2133 @REQ(get_thread_input)
2134 thread_id_t tid; /* id of thread */
2135 @REPLY
2136 user_handle_t focus; /* handle to the focus window */
2137 user_handle_t capture; /* handle to the capture window */
2138 user_handle_t active; /* handle to the active window */
2139 user_handle_t foreground; /* handle to the global foreground window */
2140 user_handle_t menu_owner; /* handle to the menu owner */
2141 user_handle_t move_size; /* handle to the moving/resizing window */
2142 user_handle_t caret; /* handle to the caret window */
2143 rectangle_t rect; /* caret rectangle */
2144 @END
2147 /* Get the time of the last input event */
2148 @REQ(get_last_input_time)
2149 @REPLY
2150 unsigned int time;
2151 @END
2154 /* Retrieve queue keyboard state for a given thread */
2155 @REQ(get_key_state)
2156 thread_id_t tid; /* id of thread */
2157 int key; /* optional key code or -1 */
2158 @REPLY
2159 unsigned char state; /* state of specified key */
2160 VARARG(keystate,bytes); /* state array for all the keys */
2161 @END
2163 /* Set queue keyboard state for a given thread */
2164 @REQ(set_key_state)
2165 thread_id_t tid; /* id of thread */
2166 VARARG(keystate,bytes); /* state array for all the keys */
2167 @END
2169 /* Set the system foreground window */
2170 @REQ(set_foreground_window)
2171 user_handle_t handle; /* handle to the foreground window */
2172 @REPLY
2173 user_handle_t previous; /* handle to the previous foreground window */
2174 int send_msg_old; /* whether we have to send a msg to the old window */
2175 int send_msg_new; /* whether we have to send a msg to the new window */
2176 @END
2178 /* Set the current thread focus window */
2179 @REQ(set_focus_window)
2180 user_handle_t handle; /* handle to the focus window */
2181 @REPLY
2182 user_handle_t previous; /* handle to the previous focus window */
2183 @END
2185 /* Set the current thread active window */
2186 @REQ(set_active_window)
2187 user_handle_t handle; /* handle to the active window */
2188 @REPLY
2189 user_handle_t previous; /* handle to the previous active window */
2190 @END
2192 /* Set the current thread capture window */
2193 @REQ(set_capture_window)
2194 user_handle_t handle; /* handle to the capture window */
2195 unsigned int flags; /* capture flags (see below) */
2196 @REPLY
2197 user_handle_t previous; /* handle to the previous capture window */
2198 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2199 @END
2200 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2201 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2204 /* Set the current thread caret window */
2205 @REQ(set_caret_window)
2206 user_handle_t handle; /* handle to the caret window */
2207 int width; /* caret width */
2208 int height; /* caret height */
2209 @REPLY
2210 user_handle_t previous; /* handle to the previous caret window */
2211 rectangle_t old_rect; /* previous caret rectangle */
2212 int old_hide; /* previous hide count */
2213 int old_state; /* previous caret state (1=on, 0=off) */
2214 @END
2217 /* Set the current thread caret information */
2218 @REQ(set_caret_info)
2219 unsigned int flags; /* caret flags (see below) */
2220 user_handle_t handle; /* handle to the caret window */
2221 int x; /* caret x position */
2222 int y; /* caret y position */
2223 int hide; /* increment for hide count (can be negative to show it) */
2224 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2225 @REPLY
2226 user_handle_t full_handle; /* handle to the current caret window */
2227 rectangle_t old_rect; /* previous caret rectangle */
2228 int old_hide; /* previous hide count */
2229 int old_state; /* previous caret state (1=on, 0=off) */
2230 @END
2231 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2232 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2233 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2236 /* Set a window hook */
2237 @REQ(set_hook)
2238 int id; /* id of the hook */
2239 process_id_t pid; /* id of process to set the hook into */
2240 thread_id_t tid; /* id of thread to set the hook into */
2241 int event_min;
2242 int event_max;
2243 int flags;
2244 void* proc; /* hook procedure */
2245 int unicode; /* is it a unicode hook? */
2246 VARARG(module,unicode_str); /* module name */
2247 @REPLY
2248 user_handle_t handle; /* handle to the hook */
2249 unsigned int active_hooks; /* active hooks bitmap */
2250 @END
2253 /* Remove a window hook */
2254 @REQ(remove_hook)
2255 user_handle_t handle; /* handle to the hook */
2256 int id; /* id of the hook if handle is 0 */
2257 void* proc; /* hook procedure if handle is 0 */
2258 @REPLY
2259 unsigned int active_hooks; /* active hooks bitmap */
2260 @END
2263 /* Start calling a hook chain */
2264 @REQ(start_hook_chain)
2265 int id; /* id of the hook */
2266 int event; /* signalled event */
2267 user_handle_t window; /* handle to the event window */
2268 int object_id; /* object id for out of context winevent */
2269 int child_id; /* child id for out of context winevent */
2270 @REPLY
2271 user_handle_t handle; /* handle to the next hook */
2272 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2273 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2274 void* proc; /* hook procedure */
2275 int unicode; /* is it a unicode hook? */
2276 unsigned int active_hooks; /* active hooks bitmap */
2277 VARARG(module,unicode_str); /* module name */
2278 @END
2281 /* Finished calling a hook chain */
2282 @REQ(finish_hook_chain)
2283 int id; /* id of the hook */
2284 @END
2287 /* Get the next hook to call */
2288 @REQ(get_next_hook)
2289 user_handle_t handle; /* handle to the current hook */
2290 int event; /* signalled event */
2291 user_handle_t window; /* handle to the event window */
2292 int object_id; /* object id for out of context winevent */
2293 int child_id; /* child id for out of context winevent */
2294 @REPLY
2295 user_handle_t next; /* handle to the next hook */
2296 int id; /* id of the next hook */
2297 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2298 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2299 void* proc; /* next hook procedure */
2300 int prev_unicode; /* was the previous a unicode hook? */
2301 int next_unicode; /* is the next a unicode hook? */
2302 VARARG(module,unicode_str); /* module name */
2303 @END
2306 /* Create a window class */
2307 @REQ(create_class)
2308 int local; /* is it a local class? */
2309 atom_t atom; /* class atom */
2310 unsigned int style; /* class style */
2311 void* instance; /* module instance */
2312 int extra; /* number of extra class bytes */
2313 int win_extra; /* number of window extra bytes */
2314 void* client_ptr; /* pointer to class in client address space */
2315 @END
2318 /* Destroy a window class */
2319 @REQ(destroy_class)
2320 atom_t atom; /* class atom */
2321 void* instance; /* module instance */
2322 @REPLY
2323 void* client_ptr; /* pointer to class in client address space */
2324 @END
2327 /* Set some information in a class */
2328 @REQ(set_class_info)
2329 user_handle_t window; /* handle to the window */
2330 unsigned int flags; /* flags for info to set (see below) */
2331 atom_t atom; /* class atom */
2332 unsigned int style; /* class style */
2333 int win_extra; /* number of window extra bytes */
2334 void* instance; /* module instance */
2335 int extra_offset; /* offset to set in extra bytes */
2336 size_t extra_size; /* size to set in extra bytes */
2337 unsigned int extra_value; /* value to set in extra bytes */
2338 @REPLY
2339 atom_t old_atom; /* previous class atom */
2340 unsigned int old_style; /* previous class style */
2341 int old_extra; /* previous number of class extra bytes */
2342 int old_win_extra; /* previous number of window extra bytes */
2343 void* old_instance; /* previous module instance */
2344 unsigned int old_extra_value; /* old value in extra bytes */
2345 @END
2346 #define SET_CLASS_ATOM 0x0001
2347 #define SET_CLASS_STYLE 0x0002
2348 #define SET_CLASS_WINEXTRA 0x0004
2349 #define SET_CLASS_INSTANCE 0x0008
2350 #define SET_CLASS_EXTRA 0x0010
2353 /* Set/get clipboard information */
2354 @REQ(set_clipboard_info)
2355 unsigned int flags; /* flags for fields to set (see below) */
2356 user_handle_t clipboard; /* clipboard window */
2357 user_handle_t owner; /* clipboard owner */
2358 user_handle_t viewer; /* first clipboard viewer */
2359 unsigned int seqno; /* change sequence number */
2360 @REPLY
2361 unsigned int flags; /* status flags (see below) */
2362 user_handle_t old_clipboard; /* old clipboard window */
2363 user_handle_t old_owner; /* old clipboard owner */
2364 user_handle_t old_viewer; /* old clipboard viewer */
2365 unsigned int seqno; /* current sequence number */
2366 @END
2368 #define SET_CB_OPEN 0x001
2369 #define SET_CB_OWNER 0x002
2370 #define SET_CB_VIEWER 0x004
2371 #define SET_CB_SEQNO 0x008
2372 #define SET_CB_RELOWNER 0x010
2373 #define SET_CB_CLOSE 0x020
2374 #define CB_OPEN 0x040
2375 #define CB_OWNER 0x080
2376 #define CB_PROCESS 0x100
2379 /* Open a security token */
2380 @REQ(open_token)
2381 obj_handle_t handle; /* handle to the thread or process */
2382 unsigned int flags; /* flags (see below) */
2383 @REPLY
2384 obj_handle_t token; /* handle to the token */
2385 @END
2386 #define OPEN_TOKEN_THREAD 1
2387 #define OPEN_TOKEN_AS_SELF 2
2390 /* Set/get the global windows */
2391 @REQ(set_global_windows)
2392 unsigned int flags; /* flags for fields to set (see below) */
2393 user_handle_t shell_window; /* handle to the new shell window */
2394 user_handle_t shell_listview; /* handle to the new shell listview window */
2395 user_handle_t progman_window; /* handle to the new program manager window */
2396 user_handle_t taskman_window; /* handle to the new task manager window */
2397 @REPLY
2398 user_handle_t old_shell_window; /* handle to the shell window */
2399 user_handle_t old_shell_listview; /* handle to the shell listview window */
2400 user_handle_t old_progman_window; /* handle to the new program manager window */
2401 user_handle_t old_taskman_window; /* handle to the new task manager window */
2402 @END
2403 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2404 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2405 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2407 /* Adjust the privileges held by a token */
2408 @REQ(adjust_token_privileges)
2409 obj_handle_t handle; /* handle to the token */
2410 int disable_all; /* disable all privileges? */
2411 int get_modified_state; /* get modified privileges? */
2412 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2413 @REPLY
2414 unsigned int len; /* total length in bytes required to store token privileges */
2415 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2416 @END
2418 /* Retrieves the set of privileges held by or available to a token */
2419 @REQ(get_token_privileges)
2420 obj_handle_t handle; /* handle to the token */
2421 @REPLY
2422 unsigned int len; /* total length in bytes required to store token privileges */
2423 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2424 @END
2426 /* Check the token has the required privileges */
2427 @REQ(check_token_privileges)
2428 obj_handle_t handle; /* handle to the token */
2429 int all_required; /* are all the privileges required for the check to succeed? */
2430 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2431 @REPLY
2432 int has_privileges; /* does the token have the required privileges? */
2433 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2434 @END
2436 @REQ(duplicate_token)
2437 obj_handle_t handle; /* handle to the token to duplicate */
2438 unsigned int access; /* access rights to the new token */
2439 int inherit; /* inherit flag */
2440 int primary; /* is the new token to be a primary one? */
2441 int impersonation_level; /* impersonation level of the new token */
2442 @REPLY
2443 obj_handle_t new_handle; /* duplicated handle */
2444 @END
2446 @REQ(access_check)
2447 obj_handle_t handle; /* handle to the token */
2448 unsigned int desired_access; /* desired access to the object */
2449 unsigned int mapping_read; /* mapping from generic read to specific rights */
2450 unsigned int mapping_write; /* mapping from generic write to specific rights */
2451 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2452 unsigned int mapping_all; /* mapping from generic all to specific rights */
2453 VARARG(sd,security_descriptor); /* security descriptor to check */
2454 @REPLY
2455 unsigned int access_granted; /* access rights actually granted */
2456 unsigned int access_status; /* was access granted? */
2457 unsigned int privileges_len; /* length needed to store privileges */
2458 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2459 @END
2461 /* Create a mailslot */
2462 @REQ(create_mailslot)
2463 unsigned int max_msgsize;
2464 unsigned int read_timeout;
2465 int inherit;
2466 VARARG(name,unicode_str); /* mailslot name */
2467 @REPLY
2468 obj_handle_t handle; /* handle to the mailslot */
2469 @END
2472 /* Open an existing mailslot */
2473 @REQ(open_mailslot)
2474 unsigned int access;
2475 int inherit; /* inherit flag */
2476 unsigned int sharing; /* sharing mode */
2477 VARARG(name,unicode_str); /* mailslot name */
2478 @REPLY
2479 obj_handle_t handle; /* handle to the mailslot */
2480 @END
2483 /* Set mailslot information */
2484 @REQ(set_mailslot_info)
2485 obj_handle_t handle; /* handle to the mailslot */
2486 unsigned int flags;
2487 unsigned int read_timeout;
2488 @REPLY
2489 unsigned int max_msgsize;
2490 unsigned int read_timeout;
2491 unsigned int msg_count;
2492 unsigned int next_msgsize;
2493 @END
2494 #define MAILSLOT_SET_READ_TIMEOUT 1