oleaut32: Typelib interfaces with the FDUAL flag should also be registered,
[wine/hacks.git] / server / protocol.def
blob663f91062e4cc7021314760bb17836d7550c7654
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 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 struct token_groups
198 unsigned int count;
199 /* unsigned int attributes[count]; */
200 /* VARARGS(sids,SID); */
203 /****************************************************************/
204 /* Request declarations */
206 /* Create a new process from the context of the parent */
207 @REQ(new_process)
208 int inherit_all; /* inherit all handles from parent */
209 unsigned int create_flags; /* creation flags */
210 int unix_pid; /* Unix pid of new process */
211 obj_handle_t exe_file; /* file handle for main exe */
212 obj_handle_t hstdin; /* handle for stdin */
213 obj_handle_t hstdout; /* handle for stdout */
214 obj_handle_t hstderr; /* handle for stderr */
215 VARARG(info,startup_info); /* startup information */
216 VARARG(env,unicode_str); /* environment for new process */
217 @REPLY
218 obj_handle_t info; /* new process info handle */
219 @END
222 /* Retrieve information about a newly started process */
223 @REQ(get_new_process_info)
224 obj_handle_t info; /* info handle returned from new_process_request */
225 unsigned int process_access; /* access rights for process object */
226 unsigned int process_attr; /* attributes for process object */
227 unsigned int thread_access; /* access rights for thread object */
228 unsigned int thread_attr; /* attributes for thread object */
229 @REPLY
230 process_id_t pid; /* process id */
231 obj_handle_t phandle; /* process handle (in the current process) */
232 thread_id_t tid; /* thread id */
233 obj_handle_t thandle; /* thread handle (in the current process) */
234 int success; /* did the process start successfully? */
235 @END
238 /* Create a new thread from the context of the parent */
239 @REQ(new_thread)
240 unsigned int access; /* wanted access rights */
241 unsigned int attributes; /* object attributes */
242 int suspend; /* new thread should be suspended on creation */
243 int request_fd; /* fd for request pipe */
244 @REPLY
245 thread_id_t tid; /* thread id */
246 obj_handle_t handle; /* thread handle (in the current process) */
247 @END
250 /* Retrieve the new process startup info */
251 @REQ(get_startup_info)
252 @REPLY
253 obj_handle_t exe_file; /* file handle for main exe */
254 obj_handle_t hstdin; /* handle for stdin */
255 obj_handle_t hstdout; /* handle for stdout */
256 obj_handle_t hstderr; /* handle for stderr */
257 VARARG(info,startup_info); /* startup information */
258 VARARG(env,unicode_str); /* environment */
259 @END
262 /* Signal the end of the process initialization */
263 @REQ(init_process_done)
264 void* module; /* main module base address */
265 void* entry; /* process entry point */
266 int gui; /* is it a GUI process? */
267 @END
270 /* Initialize a thread; called from the child after fork()/clone() */
271 @REQ(init_thread)
272 int unix_pid; /* Unix pid of new thread */
273 int unix_tid; /* Unix tid of new thread */
274 void* teb; /* TEB of new thread (in thread address space) */
275 void* peb; /* address of PEB (in thread address space) */
276 void* entry; /* thread entry point (in thread address space) */
277 void* ldt_copy; /* address of LDT copy (in thread address space) */
278 int reply_fd; /* fd for reply pipe */
279 int wait_fd; /* fd for blocking calls pipe */
280 int debug_level; /* new debug level */
281 @REPLY
282 process_id_t pid; /* process id of the new thread's process */
283 thread_id_t tid; /* thread id of the new thread */
284 size_t info_size; /* total size of startup info */
285 time_t server_start; /* server start time */
286 int version; /* protocol version */
287 @END
290 /* Terminate a process */
291 @REQ(terminate_process)
292 obj_handle_t handle; /* process handle to terminate */
293 int exit_code; /* process exit code */
294 @REPLY
295 int self; /* suicide? */
296 @END
299 /* Terminate a thread */
300 @REQ(terminate_thread)
301 obj_handle_t handle; /* thread handle to terminate */
302 int exit_code; /* thread exit code */
303 @REPLY
304 int self; /* suicide? */
305 int last; /* last thread in this process? */
306 @END
309 /* Retrieve information about a process */
310 @REQ(get_process_info)
311 obj_handle_t handle; /* process handle */
312 @REPLY
313 process_id_t pid; /* server process id */
314 process_id_t ppid; /* server process id of parent */
315 int exit_code; /* process exit code */
316 int priority; /* priority class */
317 int affinity; /* process affinity mask */
318 void* peb; /* PEB address in process address space */
319 @END
322 /* Set a process informations */
323 @REQ(set_process_info)
324 obj_handle_t handle; /* process handle */
325 int mask; /* setting mask (see below) */
326 int priority; /* priority class */
327 int affinity; /* affinity mask */
328 @END
329 #define SET_PROCESS_INFO_PRIORITY 0x01
330 #define SET_PROCESS_INFO_AFFINITY 0x02
333 /* Retrieve information about a thread */
334 @REQ(get_thread_info)
335 obj_handle_t handle; /* thread handle */
336 thread_id_t tid_in; /* thread id (optional) */
337 @REPLY
338 process_id_t pid; /* server process id */
339 thread_id_t tid; /* server thread id */
340 void* teb; /* thread teb pointer */
341 int exit_code; /* thread exit code */
342 int priority; /* thread priority level */
343 int affinity; /* thread affinity mask */
344 time_t creation_time; /* thread creation time */
345 time_t exit_time; /* thread exit time */
346 @END
349 /* Set a thread informations */
350 @REQ(set_thread_info)
351 obj_handle_t handle; /* thread handle */
352 int mask; /* setting mask (see below) */
353 int priority; /* priority class */
354 int affinity; /* affinity mask */
355 obj_handle_t token; /* impersonation token */
356 @END
357 #define SET_THREAD_INFO_PRIORITY 0x01
358 #define SET_THREAD_INFO_AFFINITY 0x02
359 #define SET_THREAD_INFO_TOKEN 0x04
362 /* Retrieve information about a module */
363 @REQ(get_dll_info)
364 obj_handle_t handle; /* process handle */
365 void* base_address; /* base address of module */
366 @REPLY
367 size_t size; /* module size */
368 void* entry_point;
369 VARARG(filename,unicode_str); /* file name of module */
370 @END
373 /* Suspend a thread */
374 @REQ(suspend_thread)
375 obj_handle_t handle; /* thread handle */
376 @REPLY
377 int count; /* new suspend count */
378 @END
381 /* Resume a thread */
382 @REQ(resume_thread)
383 obj_handle_t handle; /* thread handle */
384 @REPLY
385 int count; /* new suspend count */
386 @END
389 /* Notify the server that a dll has been loaded */
390 @REQ(load_dll)
391 obj_handle_t handle; /* file handle */
392 void* base; /* base address */
393 size_t size; /* dll size */
394 int dbg_offset; /* debug info offset */
395 int dbg_size; /* debug info size */
396 void* name; /* ptr to ptr to name (in process addr space) */
397 VARARG(filename,unicode_str); /* file name of dll */
398 @END
401 /* Notify the server that a dll is being unloaded */
402 @REQ(unload_dll)
403 void* base; /* base address */
404 @END
407 /* Queue an APC for a thread */
408 @REQ(queue_apc)
409 obj_handle_t handle; /* thread handle */
410 int user; /* user or system apc? */
411 void* func; /* function to call */
412 void* arg1; /* params for function to call */
413 void* arg2;
414 void* arg3;
415 @END
418 /* Get next APC to call */
419 @REQ(get_apc)
420 int alertable; /* is thread alertable? */
421 @REPLY
422 void* func; /* function to call */
423 int type; /* function type */
424 void* arg1; /* function arguments */
425 void* arg2;
426 void* arg3;
427 @END
428 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
431 /* Close a handle for the current process */
432 @REQ(close_handle)
433 obj_handle_t handle; /* handle to close */
434 @REPLY
435 int fd; /* associated fd to close */
436 @END
439 /* Set a handle information */
440 @REQ(set_handle_info)
441 obj_handle_t handle; /* handle we are interested in */
442 int flags; /* new handle flags */
443 int mask; /* mask for flags to set */
444 @REPLY
445 int old_flags; /* old flag value */
446 @END
449 /* Duplicate a handle */
450 @REQ(dup_handle)
451 obj_handle_t src_process; /* src process handle */
452 obj_handle_t src_handle; /* src handle to duplicate */
453 obj_handle_t dst_process; /* dst process handle */
454 unsigned int access; /* wanted access rights */
455 unsigned int attributes; /* object attributes */
456 unsigned int options; /* duplicate options (see below) */
457 @REPLY
458 obj_handle_t handle; /* duplicated handle in dst process */
459 int fd; /* associated fd to close */
460 @END
461 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
462 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
463 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
466 /* Open a handle to a process */
467 @REQ(open_process)
468 process_id_t pid; /* process id to open */
469 unsigned int access; /* wanted access rights */
470 unsigned int attributes; /* object attributes */
471 @REPLY
472 obj_handle_t handle; /* handle to the process */
473 @END
476 /* Open a handle to a thread */
477 @REQ(open_thread)
478 thread_id_t tid; /* thread id to open */
479 unsigned int access; /* wanted access rights */
480 unsigned int attributes; /* object attributes */
481 @REPLY
482 obj_handle_t handle; /* handle to the thread */
483 @END
486 /* Wait for handles */
487 @REQ(select)
488 int flags; /* wait flags (see below) */
489 void* cookie; /* magic cookie to return to client */
490 obj_handle_t signal; /* object to signal (0 if none) */
491 abs_time_t timeout; /* absolute timeout */
492 VARARG(handles,handles); /* handles to select on */
493 @END
494 #define SELECT_ALL 1
495 #define SELECT_ALERTABLE 2
496 #define SELECT_INTERRUPTIBLE 4
497 #define SELECT_TIMEOUT 8
500 /* Create an event */
501 @REQ(create_event)
502 unsigned int access; /* wanted access rights */
503 unsigned int attributes; /* object attributes */
504 obj_handle_t rootdir; /* root directory */
505 int manual_reset; /* manual reset event */
506 int initial_state; /* initial state of the event */
507 VARARG(name,unicode_str); /* object name */
508 @REPLY
509 obj_handle_t handle; /* handle to the event */
510 @END
512 /* Event operation */
513 @REQ(event_op)
514 obj_handle_t handle; /* handle to event */
515 int op; /* event operation (see below) */
516 @END
517 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
520 /* Open an event */
521 @REQ(open_event)
522 unsigned int access; /* wanted access rights */
523 unsigned int attributes; /* object attributes */
524 obj_handle_t rootdir; /* root directory */
525 VARARG(name,unicode_str); /* object name */
526 @REPLY
527 obj_handle_t handle; /* handle to the event */
528 @END
531 /* Create a mutex */
532 @REQ(create_mutex)
533 unsigned int access; /* wanted access rights */
534 unsigned int attributes; /* object attributes */
535 obj_handle_t rootdir; /* root directory */
536 int owned; /* initially owned? */
537 VARARG(name,unicode_str); /* object name */
538 @REPLY
539 obj_handle_t handle; /* handle to the mutex */
540 @END
543 /* Release a mutex */
544 @REQ(release_mutex)
545 obj_handle_t handle; /* handle to the mutex */
546 @REPLY
547 unsigned int prev_count; /* value of internal counter, before release */
548 @END
551 /* Open a mutex */
552 @REQ(open_mutex)
553 unsigned int access; /* wanted access rights */
554 unsigned int attributes; /* object attributes */
555 obj_handle_t rootdir; /* root directory */
556 VARARG(name,unicode_str); /* object name */
557 @REPLY
558 obj_handle_t handle; /* handle to the mutex */
559 @END
562 /* Create a semaphore */
563 @REQ(create_semaphore)
564 unsigned int access; /* wanted access rights */
565 unsigned int attributes; /* object attributes */
566 obj_handle_t rootdir; /* root directory */
567 unsigned int initial; /* initial count */
568 unsigned int max; /* maximum count */
569 VARARG(name,unicode_str); /* object name */
570 @REPLY
571 obj_handle_t handle; /* handle to the semaphore */
572 @END
575 /* Release a semaphore */
576 @REQ(release_semaphore)
577 obj_handle_t handle; /* handle to the semaphore */
578 unsigned int count; /* count to add to semaphore */
579 @REPLY
580 unsigned int prev_count; /* previous semaphore count */
581 @END
584 /* Open a semaphore */
585 @REQ(open_semaphore)
586 unsigned int access; /* wanted access rights */
587 unsigned int attributes; /* object attributes */
588 obj_handle_t rootdir; /* root directory */
589 VARARG(name,unicode_str); /* object name */
590 @REPLY
591 obj_handle_t handle; /* handle to the semaphore */
592 @END
595 /* Create a file */
596 @REQ(create_file)
597 unsigned int access; /* wanted access rights */
598 unsigned int attributes; /* object attributes */
599 unsigned int sharing; /* sharing flags */
600 int create; /* file create action */
601 unsigned int options; /* file options */
602 unsigned int attrs; /* file attributes for creation */
603 VARARG(filename,string); /* file name */
604 @REPLY
605 obj_handle_t handle; /* handle to the file */
606 @END
609 /* Open a file object */
610 @REQ(open_file_object)
611 unsigned int access; /* wanted access rights */
612 unsigned int attributes; /* open attributes */
613 obj_handle_t rootdir; /* root directory */
614 unsigned int sharing; /* sharing flags */
615 VARARG(filename,unicode_str); /* file name */
616 @REPLY
617 obj_handle_t handle; /* handle to the file */
618 @END
621 /* Allocate a file handle for a Unix fd */
622 @REQ(alloc_file_handle)
623 unsigned int access; /* wanted access rights */
624 unsigned int attributes; /* object attributes */
625 int fd; /* file descriptor on the client side */
626 @REPLY
627 obj_handle_t handle; /* handle to the file */
628 @END
631 /* Get a Unix fd to access a file */
632 @REQ(get_handle_fd)
633 obj_handle_t handle; /* handle to the file */
634 unsigned int access; /* wanted access rights */
635 @REPLY
636 int fd; /* file descriptor */
637 int removable; /* is device removable? (-1 if unknown) */
638 int flags; /* file read/write flags (see below) */
639 @END
640 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
641 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
642 #define FD_FLAG_RECV_SHUTDOWN 0x04
643 #define FD_FLAG_SEND_SHUTDOWN 0x08
644 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
645 * only handle available data (don't wait) */
647 /* Set the cached file descriptor of a handle */
648 @REQ(set_handle_fd)
649 obj_handle_t handle; /* handle we are interested in */
650 int fd; /* file descriptor */
651 int removable; /* is device removable? (-1 if unknown) */
652 @REPLY
653 int cur_fd; /* current file descriptor */
654 @END
657 /* Flush a file buffers */
658 @REQ(flush_file)
659 obj_handle_t handle; /* handle to the file */
660 @REPLY
661 obj_handle_t event; /* event set when finished */
662 @END
665 /* Lock a region of a file */
666 @REQ(lock_file)
667 obj_handle_t handle; /* handle to the file */
668 unsigned int offset_low; /* offset of start of lock */
669 unsigned int offset_high; /* offset of start of lock */
670 unsigned int count_low; /* count of bytes to lock */
671 unsigned int count_high; /* count of bytes to lock */
672 int shared; /* shared or exclusive lock? */
673 int wait; /* do we want to wait? */
674 @REPLY
675 obj_handle_t handle; /* handle to wait on */
676 int overlapped; /* is it an overlapped I/O handle? */
677 @END
680 /* Unlock a region of a file */
681 @REQ(unlock_file)
682 obj_handle_t handle; /* handle to the file */
683 unsigned int offset_low; /* offset of start of unlock */
684 unsigned int offset_high; /* offset of start of unlock */
685 unsigned int count_low; /* count of bytes to unlock */
686 unsigned int count_high; /* count of bytes to unlock */
687 @END
690 /* Get ready to unmount a Unix device */
691 @REQ(unmount_device)
692 obj_handle_t handle; /* handle to a file on the device */
693 @END
696 /* Create a socket */
697 @REQ(create_socket)
698 unsigned int access; /* wanted access rights */
699 unsigned int attributes; /* object attributes */
700 int family; /* family, see socket manpage */
701 int type; /* type, see socket manpage */
702 int protocol; /* protocol, see socket manpage */
703 unsigned int flags; /* socket flags */
704 @REPLY
705 obj_handle_t handle; /* handle to the new socket */
706 @END
709 /* Accept a socket */
710 @REQ(accept_socket)
711 obj_handle_t lhandle; /* handle to the listening socket */
712 unsigned int access; /* wanted access rights */
713 unsigned int attributes; /* object attributes */
714 @REPLY
715 obj_handle_t handle; /* handle to the new socket */
716 @END
719 /* Set socket event parameters */
720 @REQ(set_socket_event)
721 obj_handle_t handle; /* handle to the socket */
722 unsigned int mask; /* event mask */
723 obj_handle_t event; /* event object */
724 user_handle_t window; /* window to send the message to */
725 unsigned int msg; /* message to send */
726 @END
729 /* Get socket event parameters */
730 @REQ(get_socket_event)
731 obj_handle_t handle; /* handle to the socket */
732 int service; /* clear pending? */
733 obj_handle_t c_event; /* event to clear */
734 @REPLY
735 unsigned int mask; /* event mask */
736 unsigned int pmask; /* pending events */
737 unsigned int state; /* status bits */
738 VARARG(errors,ints); /* event errors */
739 @END
742 /* Reenable pending socket events */
743 @REQ(enable_socket_event)
744 obj_handle_t handle; /* handle to the socket */
745 unsigned int mask; /* events to re-enable */
746 unsigned int sstate; /* status bits to set */
747 unsigned int cstate; /* status bits to clear */
748 @END
750 @REQ(set_socket_deferred)
751 obj_handle_t handle; /* handle to the socket */
752 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
753 @END
755 /* Allocate a console (only used by a console renderer) */
756 @REQ(alloc_console)
757 unsigned int access; /* wanted access rights */
758 unsigned int attributes; /* object attributes */
759 process_id_t pid; /* pid of process which shall be attached to the console */
760 @REPLY
761 obj_handle_t handle_in; /* handle to console input */
762 obj_handle_t event; /* handle to renderer events change notification */
763 @END
766 /* Free the console of the current process */
767 @REQ(free_console)
768 @END
771 #define CONSOLE_RENDERER_NONE_EVENT 0x00
772 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
773 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
774 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
775 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
776 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
777 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
778 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
779 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
780 struct console_renderer_event
782 short event;
783 union
785 struct update
787 short top;
788 short bottom;
789 } update;
790 struct resize
792 short width;
793 short height;
794 } resize;
795 struct cursor_pos
797 short x;
798 short y;
799 } cursor_pos;
800 struct cursor_geom
802 short visible;
803 short size;
804 } cursor_geom;
805 struct display
807 short left;
808 short top;
809 short width;
810 short height;
811 } display;
812 } u;
815 /* retrieve console events for the renderer */
816 @REQ(get_console_renderer_events)
817 obj_handle_t handle; /* handle to console input events */
818 @REPLY
819 VARARG(data,bytes); /* the various console_renderer_events */
820 @END
823 /* Open a handle to the process console */
824 @REQ(open_console)
825 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
826 /* otherwise console_in handle to get active screen buffer? */
827 unsigned int access; /* wanted access rights */
828 unsigned int attributes; /* object attributes */
829 int share; /* share mask (only for output handles) */
830 @REPLY
831 obj_handle_t handle; /* handle to the console */
832 @END
835 /* Get the input queue wait event */
836 @REQ(get_console_wait_event)
837 @REPLY
838 obj_handle_t handle;
839 @END
841 /* Get a console mode (input or output) */
842 @REQ(get_console_mode)
843 obj_handle_t handle; /* handle to the console */
844 @REPLY
845 int mode; /* console mode */
846 @END
849 /* Set a console mode (input or output) */
850 @REQ(set_console_mode)
851 obj_handle_t handle; /* handle to the console */
852 int mode; /* console mode */
853 @END
856 /* Set info about a console (input only) */
857 @REQ(set_console_input_info)
858 obj_handle_t handle; /* handle to console input, or 0 for process' console */
859 int mask; /* setting mask (see below) */
860 obj_handle_t active_sb; /* active screen buffer */
861 int history_mode; /* whether we duplicate lines in history */
862 int history_size; /* number of lines in history */
863 int edition_mode; /* index to the edition mode flavors */
864 VARARG(title,unicode_str); /* console title */
865 @END
866 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
867 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
868 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
869 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
870 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
873 /* Get info about a console (input only) */
874 @REQ(get_console_input_info)
875 obj_handle_t handle; /* handle to console input, or 0 for process' console */
876 @REPLY
877 int history_mode; /* whether we duplicate lines in history */
878 int history_size; /* number of lines in history */
879 int history_index; /* number of used lines in history */
880 int edition_mode; /* index to the edition mode flavors */
881 VARARG(title,unicode_str); /* console title */
882 @END
885 /* appends a string to console's history */
886 @REQ(append_console_input_history)
887 obj_handle_t handle; /* handle to console input, or 0 for process' console */
888 VARARG(line,unicode_str); /* line to add */
889 @END
892 /* appends a string to console's history */
893 @REQ(get_console_input_history)
894 obj_handle_t handle; /* handle to console input, or 0 for process' console */
895 int index; /* index to get line from */
896 @REPLY
897 int total; /* total length of line in Unicode chars */
898 VARARG(line,unicode_str); /* line to add */
899 @END
902 /* creates a new screen buffer on process' console */
903 @REQ(create_console_output)
904 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
905 unsigned int access; /* wanted access rights */
906 unsigned int attributes; /* object attributes */
907 unsigned int share; /* sharing credentials */
908 @REPLY
909 obj_handle_t handle_out; /* handle to the screen buffer */
910 @END
913 /* Set info about a console (output only) */
914 @REQ(set_console_output_info)
915 obj_handle_t handle; /* handle to the console */
916 int mask; /* setting mask (see below) */
917 short int cursor_size; /* size of cursor (percentage filled) */
918 short int cursor_visible;/* cursor visibility flag */
919 short int cursor_x; /* position of cursor (x, y) */
920 short int cursor_y;
921 short int width; /* width of the screen buffer */
922 short int height; /* height of the screen buffer */
923 short int attr; /* default attribute */
924 short int win_left; /* window actually displayed by renderer */
925 short int win_top; /* the rect area is expressed withing the */
926 short int win_right; /* boundaries of the screen buffer */
927 short int win_bottom;
928 short int max_width; /* maximum size (width x height) for the window */
929 short int max_height;
930 @END
931 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
932 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
933 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
934 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
935 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
936 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
939 /* Get info about a console (output only) */
940 @REQ(get_console_output_info)
941 obj_handle_t handle; /* handle to the console */
942 @REPLY
943 short int cursor_size; /* size of cursor (percentage filled) */
944 short int cursor_visible;/* cursor visibility flag */
945 short int cursor_x; /* position of cursor (x, y) */
946 short int cursor_y;
947 short int width; /* width of the screen buffer */
948 short int height; /* height of the screen buffer */
949 short int attr; /* default attribute */
950 short int win_left; /* window actually displayed by renderer */
951 short int win_top; /* the rect area is expressed withing the */
952 short int win_right; /* boundaries of the screen buffer */
953 short int win_bottom;
954 short int max_width; /* maximum size (width x height) for the window */
955 short int max_height;
956 @END
958 /* Add input records to a console input queue */
959 @REQ(write_console_input)
960 obj_handle_t handle; /* handle to the console input */
961 VARARG(rec,input_records); /* input records */
962 @REPLY
963 int written; /* number of records written */
964 @END
967 /* Fetch input records from a console input queue */
968 @REQ(read_console_input)
969 obj_handle_t handle; /* handle to the console input */
970 int flush; /* flush the retrieved records from the queue? */
971 @REPLY
972 int read; /* number of records read */
973 VARARG(rec,input_records); /* input records */
974 @END
977 /* write data (chars and/or attributes) in a screen buffer */
978 @REQ(write_console_output)
979 obj_handle_t handle; /* handle to the console output */
980 int x; /* position where to start writing */
981 int y;
982 int mode; /* char info (see below) */
983 int wrap; /* wrap around at end of line? */
984 VARARG(data,bytes); /* info to write */
985 @REPLY
986 int written; /* number of char infos actually written */
987 int width; /* width of screen buffer */
988 int height; /* height of screen buffer */
989 @END
990 enum char_info_mode
992 CHAR_INFO_MODE_TEXT, /* characters only */
993 CHAR_INFO_MODE_ATTR, /* attributes only */
994 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
995 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
999 /* fill a screen buffer with constant data (chars and/or attributes) */
1000 @REQ(fill_console_output)
1001 obj_handle_t handle; /* handle to the console output */
1002 int x; /* position where to start writing */
1003 int y;
1004 int mode; /* char info mode */
1005 int count; /* number to write */
1006 int wrap; /* wrap around at end of line? */
1007 char_info_t data; /* data to write */
1008 @REPLY
1009 int written; /* number of char infos actually written */
1010 @END
1013 /* read data (chars and/or attributes) from a screen buffer */
1014 @REQ(read_console_output)
1015 obj_handle_t handle; /* handle to the console output */
1016 int x; /* position (x,y) where to start reading */
1017 int y;
1018 int mode; /* char info mode */
1019 int wrap; /* wrap around at end of line? */
1020 @REPLY
1021 int width; /* width of screen buffer */
1022 int height; /* height of screen buffer */
1023 VARARG(data,bytes);
1024 @END
1027 /* move a rect (of data) in screen buffer content */
1028 @REQ(move_console_output)
1029 obj_handle_t handle; /* handle to the console output */
1030 short int x_src; /* position (x, y) of rect to start moving from */
1031 short int y_src;
1032 short int x_dst; /* position (x, y) of rect to move to */
1033 short int y_dst;
1034 short int w; /* size of the rect (width, height) to move */
1035 short int h;
1036 @END
1039 /* Sends a signal to a process group */
1040 @REQ(send_console_signal)
1041 int signal; /* the signal to send */
1042 process_id_t group_id; /* the group to send the signal to */
1043 @END
1046 /* enable directory change notifications */
1047 @REQ(read_directory_changes)
1048 obj_handle_t handle; /* handle to the directory */
1049 obj_handle_t event; /* handle to the event */
1050 unsigned int filter; /* notification filter */
1051 int subtree; /* watch the subtree? */
1052 int want_data; /* flag indicating whether change data should be collected */
1053 void* io_apc; /* APC routine to queue upon end of async */
1054 void* io_sb; /* I/O status block (unique across all async on this handle) */
1055 void* io_user; /* data to pass back to caller */
1056 @END
1059 @REQ(read_change)
1060 obj_handle_t handle;
1061 @REPLY
1062 int action; /* type of change */
1063 VARARG(name,string); /* name of directory entry that changed */
1064 @END
1067 /* Create a file mapping */
1068 @REQ(create_mapping)
1069 unsigned int access; /* wanted access rights */
1070 unsigned int attributes; /* object attributes */
1071 obj_handle_t rootdir; /* root directory */
1072 int size_high; /* mapping size */
1073 int size_low; /* mapping size */
1074 int protect; /* protection flags (see below) */
1075 obj_handle_t file_handle; /* file handle */
1076 VARARG(name,unicode_str); /* object name */
1077 @REPLY
1078 obj_handle_t handle; /* handle to the mapping */
1079 @END
1080 /* protection flags */
1081 #define VPROT_READ 0x01
1082 #define VPROT_WRITE 0x02
1083 #define VPROT_EXEC 0x04
1084 #define VPROT_WRITECOPY 0x08
1085 #define VPROT_GUARD 0x10
1086 #define VPROT_NOCACHE 0x20
1087 #define VPROT_COMMITTED 0x40
1088 #define VPROT_IMAGE 0x80
1091 /* Open a mapping */
1092 @REQ(open_mapping)
1093 unsigned int access; /* wanted access rights */
1094 unsigned int attributes; /* object attributes */
1095 obj_handle_t rootdir; /* root directory */
1096 VARARG(name,unicode_str); /* object name */
1097 @REPLY
1098 obj_handle_t handle; /* handle to the mapping */
1099 @END
1102 /* Get information about a file mapping */
1103 @REQ(get_mapping_info)
1104 obj_handle_t handle; /* handle to the mapping */
1105 @REPLY
1106 int size_high; /* mapping size */
1107 int size_low; /* mapping size */
1108 int protect; /* protection flags */
1109 int header_size; /* header size (for VPROT_IMAGE mapping) */
1110 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1111 obj_handle_t shared_file; /* shared mapping file handle */
1112 int shared_size; /* shared mapping size */
1113 @END
1116 #define SNAP_HEAPLIST 0x00000001
1117 #define SNAP_PROCESS 0x00000002
1118 #define SNAP_THREAD 0x00000004
1119 #define SNAP_MODULE 0x00000008
1120 /* Create a snapshot */
1121 @REQ(create_snapshot)
1122 unsigned int attributes; /* object attributes */
1123 int flags; /* snapshot flags (SNAP_*) */
1124 process_id_t pid; /* process id */
1125 @REPLY
1126 obj_handle_t handle; /* handle to the snapshot */
1127 @END
1130 /* Get the next process from a snapshot */
1131 @REQ(next_process)
1132 obj_handle_t handle; /* handle to the snapshot */
1133 int reset; /* reset snapshot position? */
1134 @REPLY
1135 int count; /* process usage count */
1136 process_id_t pid; /* process id */
1137 process_id_t ppid; /* parent process id */
1138 void* heap; /* heap base */
1139 void* module; /* main module */
1140 int threads; /* number of threads */
1141 int priority; /* process priority */
1142 int handles; /* number of handles */
1143 VARARG(filename,unicode_str); /* file name of main exe */
1144 @END
1147 /* Get the next thread from a snapshot */
1148 @REQ(next_thread)
1149 obj_handle_t handle; /* handle to the snapshot */
1150 int reset; /* reset snapshot position? */
1151 @REPLY
1152 int count; /* thread usage count */
1153 process_id_t pid; /* process id */
1154 thread_id_t tid; /* thread id */
1155 int base_pri; /* base priority */
1156 int delta_pri; /* delta priority */
1157 @END
1160 /* Get the next module from a snapshot */
1161 @REQ(next_module)
1162 obj_handle_t handle; /* handle to the snapshot */
1163 int reset; /* reset snapshot position? */
1164 @REPLY
1165 process_id_t pid; /* process id */
1166 void* base; /* module base address */
1167 size_t size; /* module size */
1168 VARARG(filename,unicode_str); /* file name of module */
1169 @END
1172 /* Wait for a debug event */
1173 @REQ(wait_debug_event)
1174 int get_handle; /* should we alloc a handle for waiting? */
1175 @REPLY
1176 process_id_t pid; /* process id */
1177 thread_id_t tid; /* thread id */
1178 obj_handle_t wait; /* wait handle if no event ready */
1179 VARARG(event,debug_event); /* debug event data */
1180 @END
1183 /* Queue an exception event */
1184 @REQ(queue_exception_event)
1185 int first; /* first chance exception? */
1186 VARARG(record,exc_event); /* thread context followed by exception record */
1187 @REPLY
1188 obj_handle_t handle; /* handle to the queued event */
1189 @END
1192 /* Retrieve the status of an exception event */
1193 @REQ(get_exception_status)
1194 obj_handle_t handle; /* handle to the queued event */
1195 @REPLY
1196 VARARG(context,context); /* modified thread context */
1197 @END
1200 /* Send an output string to the debugger */
1201 @REQ(output_debug_string)
1202 void* string; /* string to display (in debugged process address space) */
1203 int unicode; /* is it Unicode? */
1204 int length; /* string length */
1205 @END
1208 /* Continue a debug event */
1209 @REQ(continue_debug_event)
1210 process_id_t pid; /* process id to continue */
1211 thread_id_t tid; /* thread id to continue */
1212 int status; /* continuation status */
1213 @END
1216 /* Start/stop debugging an existing process */
1217 @REQ(debug_process)
1218 process_id_t pid; /* id of the process to debug */
1219 int attach; /* 1=attaching / 0=detaching from the process */
1220 @END
1223 /* Simulate a breakpoint in a process */
1224 @REQ(debug_break)
1225 obj_handle_t handle; /* process handle */
1226 @REPLY
1227 int self; /* was it the caller itself? */
1228 @END
1231 /* Set debugger kill on exit flag */
1232 @REQ(set_debugger_kill_on_exit)
1233 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1234 @END
1237 /* Read data from a process address space */
1238 @REQ(read_process_memory)
1239 obj_handle_t handle; /* process handle */
1240 void* addr; /* addr to read from */
1241 @REPLY
1242 VARARG(data,bytes); /* result data */
1243 @END
1246 /* Write data to a process address space */
1247 @REQ(write_process_memory)
1248 obj_handle_t handle; /* process handle */
1249 void* addr; /* addr to write to */
1250 VARARG(data,bytes); /* data to write */
1251 @END
1254 /* Create a registry key */
1255 @REQ(create_key)
1256 obj_handle_t parent; /* handle to the parent key */
1257 unsigned int access; /* desired access rights */
1258 unsigned int attributes; /* object attributes */
1259 unsigned int options; /* creation options */
1260 time_t modif; /* last modification time */
1261 size_t namelen; /* length of key name in bytes */
1262 VARARG(name,unicode_str,namelen); /* key name */
1263 VARARG(class,unicode_str); /* class name */
1264 @REPLY
1265 obj_handle_t hkey; /* handle to the created key */
1266 int created; /* has it been newly created? */
1267 @END
1269 /* Open a registry key */
1270 @REQ(open_key)
1271 obj_handle_t parent; /* handle to the parent key */
1272 unsigned int access; /* desired access rights */
1273 unsigned int attributes; /* object attributes */
1274 VARARG(name,unicode_str); /* key name */
1275 @REPLY
1276 obj_handle_t hkey; /* handle to the open key */
1277 @END
1280 /* Delete a registry key */
1281 @REQ(delete_key)
1282 obj_handle_t hkey; /* handle to the key */
1283 @END
1286 /* Flush a registry key */
1287 @REQ(flush_key)
1288 obj_handle_t hkey; /* handle to the key */
1289 @END
1292 /* Enumerate registry subkeys */
1293 @REQ(enum_key)
1294 obj_handle_t hkey; /* handle to registry key */
1295 int index; /* index of subkey (or -1 for current key) */
1296 int info_class; /* requested information class */
1297 @REPLY
1298 int subkeys; /* number of subkeys */
1299 int max_subkey; /* longest subkey name */
1300 int max_class; /* longest class name */
1301 int values; /* number of values */
1302 int max_value; /* longest value name */
1303 int max_data; /* longest value data */
1304 time_t modif; /* last modification time */
1305 size_t total; /* total length needed for full name and class */
1306 size_t namelen; /* length of key name in bytes */
1307 VARARG(name,unicode_str,namelen); /* key name */
1308 VARARG(class,unicode_str); /* class name */
1309 @END
1312 /* Set a value of a registry key */
1313 @REQ(set_key_value)
1314 obj_handle_t hkey; /* handle to registry key */
1315 int type; /* value type */
1316 size_t namelen; /* length of value name in bytes */
1317 VARARG(name,unicode_str,namelen); /* value name */
1318 VARARG(data,bytes); /* value data */
1319 @END
1322 /* Retrieve the value of a registry key */
1323 @REQ(get_key_value)
1324 obj_handle_t hkey; /* handle to registry key */
1325 VARARG(name,unicode_str); /* value name */
1326 @REPLY
1327 int type; /* value type */
1328 size_t total; /* total length needed for data */
1329 VARARG(data,bytes); /* value data */
1330 @END
1333 /* Enumerate a value of a registry key */
1334 @REQ(enum_key_value)
1335 obj_handle_t hkey; /* handle to registry key */
1336 int index; /* value index */
1337 int info_class; /* requested information class */
1338 @REPLY
1339 int type; /* value type */
1340 size_t total; /* total length needed for full name and data */
1341 size_t namelen; /* length of value name in bytes */
1342 VARARG(name,unicode_str,namelen); /* value name */
1343 VARARG(data,bytes); /* value data */
1344 @END
1347 /* Delete a value of a registry key */
1348 @REQ(delete_key_value)
1349 obj_handle_t hkey; /* handle to registry key */
1350 VARARG(name,unicode_str); /* value name */
1351 @END
1354 /* Load a registry branch from a file */
1355 @REQ(load_registry)
1356 obj_handle_t hkey; /* root key to load to */
1357 obj_handle_t file; /* file to load from */
1358 VARARG(name,unicode_str); /* subkey name */
1359 @END
1362 /* UnLoad a registry branch from a file */
1363 @REQ(unload_registry)
1364 obj_handle_t hkey; /* root key to unload to */
1365 @END
1368 /* Save a registry branch to a file */
1369 @REQ(save_registry)
1370 obj_handle_t hkey; /* key to save */
1371 obj_handle_t file; /* file to save to */
1372 @END
1375 /* Add a registry key change notification */
1376 @REQ(set_registry_notification)
1377 obj_handle_t hkey; /* key to watch for changes */
1378 obj_handle_t event; /* event to set */
1379 int subtree; /* should we watch the whole subtree? */
1380 unsigned int filter; /* things to watch */
1381 @END
1384 /* Create a waitable timer */
1385 @REQ(create_timer)
1386 unsigned int access; /* wanted access rights */
1387 unsigned int attributes; /* object attributes */
1388 obj_handle_t rootdir; /* root directory */
1389 int manual; /* manual reset */
1390 VARARG(name,unicode_str); /* object name */
1391 @REPLY
1392 obj_handle_t handle; /* handle to the timer */
1393 @END
1396 /* Open a waitable timer */
1397 @REQ(open_timer)
1398 unsigned int access; /* wanted access rights */
1399 unsigned int attributes; /* object attributes */
1400 obj_handle_t rootdir; /* root directory */
1401 VARARG(name,unicode_str); /* object name */
1402 @REPLY
1403 obj_handle_t handle; /* handle to the timer */
1404 @END
1406 /* Set a waitable timer */
1407 @REQ(set_timer)
1408 obj_handle_t handle; /* handle to the timer */
1409 abs_time_t expire; /* next expiration absolute time */
1410 int period; /* timer period in ms */
1411 void* callback; /* callback function */
1412 void* arg; /* callback argument */
1413 @REPLY
1414 int signaled; /* was the timer signaled before this call ? */
1415 @END
1417 /* Cancel a waitable timer */
1418 @REQ(cancel_timer)
1419 obj_handle_t handle; /* handle to the timer */
1420 @REPLY
1421 int signaled; /* was the timer signaled before this calltime ? */
1422 @END
1424 /* Get information on a waitable timer */
1425 @REQ(get_timer_info)
1426 obj_handle_t handle; /* handle to the timer */
1427 @REPLY
1428 abs_time_t when; /* absolute time when the timer next expires */
1429 int signaled; /* is the timer signaled? */
1430 @END
1433 /* Retrieve the current context of a thread */
1434 @REQ(get_thread_context)
1435 obj_handle_t handle; /* thread handle */
1436 unsigned int flags; /* context flags */
1437 int suspend; /* if getting context during suspend */
1438 @REPLY
1439 int self; /* was it a handle to the current thread? */
1440 VARARG(context,context); /* thread context */
1441 @END
1444 /* Set the current context of a thread */
1445 @REQ(set_thread_context)
1446 obj_handle_t handle; /* thread handle */
1447 unsigned int flags; /* context flags */
1448 int suspend; /* if setting context during suspend */
1449 VARARG(context,context); /* thread context */
1450 @REPLY
1451 int self; /* was it a handle to the current thread? */
1452 @END
1455 /* Fetch a selector entry for a thread */
1456 @REQ(get_selector_entry)
1457 obj_handle_t handle; /* thread handle */
1458 int entry; /* LDT entry */
1459 @REPLY
1460 unsigned int base; /* selector base */
1461 unsigned int limit; /* selector limit */
1462 unsigned char flags; /* selector flags */
1463 @END
1466 /* Add an atom */
1467 @REQ(add_atom)
1468 obj_handle_t table; /* which table to add atom to */
1469 VARARG(name,unicode_str); /* atom name */
1470 @REPLY
1471 atom_t atom; /* resulting atom */
1472 @END
1475 /* Delete an atom */
1476 @REQ(delete_atom)
1477 obj_handle_t table; /* which table to delete atom from */
1478 atom_t atom; /* atom handle */
1479 @END
1482 /* Find an atom */
1483 @REQ(find_atom)
1484 obj_handle_t table; /* which table to find atom from */
1485 VARARG(name,unicode_str); /* atom name */
1486 @REPLY
1487 atom_t atom; /* atom handle */
1488 @END
1491 /* Get information about an atom */
1492 @REQ(get_atom_information)
1493 obj_handle_t table; /* which table to find atom from */
1494 atom_t atom; /* atom handle */
1495 @REPLY
1496 int count; /* atom lock count */
1497 int pinned; /* whether the atom has been pinned */
1498 size_t total; /* actual length of atom name */
1499 VARARG(name,unicode_str); /* atom name */
1500 @END
1503 /* Set information about an atom */
1504 @REQ(set_atom_information)
1505 obj_handle_t table; /* which table to find atom from */
1506 atom_t atom; /* atom handle */
1507 int pinned; /* whether to bump atom information */
1508 @END
1511 /* Empty an atom table */
1512 @REQ(empty_atom_table)
1513 obj_handle_t table; /* which table to find atom from */
1514 int if_pinned; /* whether to delete pinned atoms */
1515 @END
1518 /* Init an atom table */
1519 @REQ(init_atom_table)
1520 int entries; /* number of entries (only for local) */
1521 @REPLY
1522 obj_handle_t table; /* handle to the atom table */
1523 @END
1526 /* Get the message queue of the current thread */
1527 @REQ(get_msg_queue)
1528 @REPLY
1529 obj_handle_t handle; /* handle to the queue */
1530 @END
1533 /* Set the current message queue wakeup mask */
1534 @REQ(set_queue_mask)
1535 unsigned int wake_mask; /* wakeup bits mask */
1536 unsigned int changed_mask; /* changed bits mask */
1537 int skip_wait; /* will we skip waiting if signaled? */
1538 @REPLY
1539 unsigned int wake_bits; /* current wake bits */
1540 unsigned int changed_bits; /* current changed bits */
1541 @END
1544 /* Get the current message queue status */
1545 @REQ(get_queue_status)
1546 int clear; /* should we clear the change bits? */
1547 @REPLY
1548 unsigned int wake_bits; /* wake bits */
1549 unsigned int changed_bits; /* changed bits since last time */
1550 @END
1553 /* Wait for a process to start waiting on input */
1554 @REQ(wait_input_idle)
1555 obj_handle_t handle; /* process handle */
1556 int timeout; /* timeout */
1557 @REPLY
1558 obj_handle_t event; /* handle to idle event */
1559 @END
1562 /* Send a message to a thread queue */
1563 @REQ(send_message)
1564 thread_id_t id; /* thread id */
1565 int type; /* message type (see below) */
1566 int flags; /* message flags (see below) */
1567 user_handle_t win; /* window handle */
1568 unsigned int msg; /* message code */
1569 unsigned long wparam; /* parameters */
1570 unsigned long lparam; /* parameters */
1571 int x; /* x position */
1572 int y; /* y position */
1573 unsigned int time; /* message time */
1574 unsigned int info; /* extra info */
1575 int timeout; /* timeout for reply */
1576 void* callback; /* callback address */
1577 VARARG(data,bytes); /* message data for sent messages */
1578 @END
1580 @REQ(post_quit_message)
1581 int exit_code; /* exit code to return */
1582 @END
1584 enum message_type
1586 MSG_ASCII, /* Ascii message (from SendMessageA) */
1587 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1588 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1589 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1590 MSG_CALLBACK_RESULT,/* result of a callback message */
1591 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1592 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1593 MSG_HARDWARE, /* hardware message */
1594 MSG_WINEVENT /* winevent message */
1596 #define SEND_MSG_ABORT_IF_HUNG 0x01
1599 /* Get a message from the current queue */
1600 @REQ(get_message)
1601 int flags; /* see below */
1602 user_handle_t get_win; /* window handle to get */
1603 unsigned int get_first; /* first message code to get */
1604 unsigned int get_last; /* last message code to get */
1605 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1606 @REPLY
1607 int type; /* message type */
1608 user_handle_t win; /* window handle */
1609 unsigned int msg; /* message code */
1610 unsigned long wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1611 unsigned long lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1612 int x; /* x position */
1613 int y; /* y position */
1614 user_handle_t hook; /* winevent hook handle */
1615 void* hook_proc; /* winevent hook proc address */
1616 unsigned int time; /* message time */
1617 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1618 unsigned int hw_id; /* id if hardware message */
1619 unsigned int active_hooks; /* active hooks bitmap */
1620 size_t total; /* total size of extra data */
1621 VARARG(data,bytes); /* message data for sent messages */
1622 @END
1623 #define GET_MSG_REMOVE 1 /* remove the message */
1624 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1626 /* Reply to a sent message */
1627 @REQ(reply_message)
1628 unsigned int result; /* message result */
1629 int remove; /* should we remove the message? */
1630 VARARG(data,bytes); /* message data for sent messages */
1631 @END
1634 /* Accept the current hardware message */
1635 @REQ(accept_hardware_message)
1636 unsigned int hw_id; /* id of the hardware message */
1637 int remove; /* should we remove the message? */
1638 user_handle_t new_win; /* new destination window for current message */
1639 @END
1642 /* Retrieve the reply for the last message sent */
1643 @REQ(get_message_reply)
1644 int cancel; /* cancel message if not ready? */
1645 @REPLY
1646 unsigned int result; /* message result */
1647 VARARG(data,bytes); /* message data for sent messages */
1648 @END
1651 /* Set a window timer */
1652 @REQ(set_win_timer)
1653 user_handle_t win; /* window handle */
1654 unsigned int msg; /* message to post */
1655 unsigned int id; /* timer id */
1656 unsigned int rate; /* timer rate in ms */
1657 unsigned long lparam; /* message lparam (callback proc) */
1658 @REPLY
1659 unsigned int id; /* timer id */
1660 @END
1663 /* Kill a window timer */
1664 @REQ(kill_win_timer)
1665 user_handle_t win; /* window handle */
1666 unsigned int msg; /* message to post */
1667 unsigned int id; /* timer id */
1668 @END
1671 /* Retrieve info about a serial port */
1672 @REQ(get_serial_info)
1673 obj_handle_t handle; /* handle to comm port */
1674 @REPLY
1675 unsigned int readinterval;
1676 unsigned int readconst;
1677 unsigned int readmult;
1678 unsigned int writeconst;
1679 unsigned int writemult;
1680 unsigned int eventmask;
1681 @END
1684 /* Set info about a serial port */
1685 @REQ(set_serial_info)
1686 obj_handle_t handle; /* handle to comm port */
1687 int flags; /* bitmask to set values (see below) */
1688 unsigned int readinterval;
1689 unsigned int readconst;
1690 unsigned int readmult;
1691 unsigned int writeconst;
1692 unsigned int writemult;
1693 unsigned int eventmask;
1694 @END
1695 #define SERIALINFO_SET_TIMEOUTS 0x01
1696 #define SERIALINFO_SET_MASK 0x02
1699 /* Create an async I/O */
1700 @REQ(register_async)
1701 obj_handle_t handle; /* handle to comm port, socket or file */
1702 int type; /* type of queue to look after */
1703 void* io_apc; /* APC routine to queue upon end of async */
1704 void* io_sb; /* I/O status block (unique across all async on this handle) */
1705 void* io_user; /* data to pass back to caller */
1706 int count; /* count - usually # of bytes to be read/written */
1707 @END
1708 #define ASYNC_TYPE_READ 0x01
1709 #define ASYNC_TYPE_WRITE 0x02
1710 #define ASYNC_TYPE_WAIT 0x03
1713 /* Cancel all async op on a fd */
1714 @REQ(cancel_async)
1715 obj_handle_t handle; /* handle to comm port, socket or file */
1716 @END
1719 /* Create a named pipe */
1720 @REQ(create_named_pipe)
1721 unsigned int access;
1722 unsigned int attributes; /* object attributes */
1723 obj_handle_t rootdir; /* root directory */
1724 unsigned int options;
1725 unsigned int flags;
1726 unsigned int maxinstances;
1727 unsigned int outsize;
1728 unsigned int insize;
1729 unsigned int timeout;
1730 VARARG(name,unicode_str); /* pipe name */
1731 @REPLY
1732 obj_handle_t handle; /* handle to the pipe */
1733 @END
1735 /* flags in create_named_pipe and get_named_pipe_info */
1736 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1737 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1738 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1739 #define NAMED_PIPE_SERVER_END 0x8000
1741 /* Open an existing named pipe */
1742 @REQ(open_named_pipe)
1743 unsigned int access;
1744 unsigned int attributes; /* object attributes */
1745 obj_handle_t rootdir; /* root directory */
1746 unsigned int flags; /* file flags */
1747 VARARG(name,unicode_str); /* pipe name */
1748 @REPLY
1749 obj_handle_t handle; /* handle to the pipe */
1750 @END
1753 /* Connect to a named pipe */
1754 @REQ(connect_named_pipe)
1755 obj_handle_t handle;
1756 obj_handle_t event;
1757 void* func;
1758 @END
1761 /* Wait for a named pipe */
1762 @REQ(wait_named_pipe)
1763 obj_handle_t handle;
1764 unsigned int timeout;
1765 obj_handle_t event;
1766 void* func;
1767 VARARG(name,unicode_str); /* pipe name */
1768 @END
1771 /* Disconnect a named pipe */
1772 @REQ(disconnect_named_pipe)
1773 obj_handle_t handle;
1774 @REPLY
1775 int fd; /* associated fd to close */
1776 @END
1779 @REQ(get_named_pipe_info)
1780 obj_handle_t handle;
1781 @REPLY
1782 unsigned int flags;
1783 unsigned int maxinstances;
1784 unsigned int instances;
1785 unsigned int outsize;
1786 unsigned int insize;
1787 @END
1790 /* Create a window */
1791 @REQ(create_window)
1792 user_handle_t parent; /* parent window */
1793 user_handle_t owner; /* owner window */
1794 atom_t atom; /* class atom */
1795 void* instance; /* module instance */
1796 @REPLY
1797 user_handle_t handle; /* created window */
1798 user_handle_t parent; /* full handle of parent */
1799 user_handle_t owner; /* full handle of owner */
1800 int extra; /* number of extra bytes */
1801 void* class_ptr; /* pointer to class in client address space */
1802 @END
1805 /* Destroy a window */
1806 @REQ(destroy_window)
1807 user_handle_t handle; /* handle to the window */
1808 @END
1811 /* Retrieve the desktop window for the current thread */
1812 @REQ(get_desktop_window)
1813 int force; /* force creation if it doesn't exist */
1814 @REPLY
1815 user_handle_t handle; /* handle to the desktop window */
1816 @END
1819 /* Set a window owner */
1820 @REQ(set_window_owner)
1821 user_handle_t handle; /* handle to the window */
1822 user_handle_t owner; /* new owner */
1823 @REPLY
1824 user_handle_t full_owner; /* full handle of new owner */
1825 user_handle_t prev_owner; /* full handle of previous owner */
1826 @END
1829 /* Get information from a window handle */
1830 @REQ(get_window_info)
1831 user_handle_t handle; /* handle to the window */
1832 @REPLY
1833 user_handle_t full_handle; /* full 32-bit handle */
1834 user_handle_t last_active; /* last active popup */
1835 process_id_t pid; /* process owning the window */
1836 thread_id_t tid; /* thread owning the window */
1837 atom_t atom; /* class atom */
1838 int is_unicode; /* ANSI or unicode */
1839 @END
1842 /* Set some information in a window */
1843 @REQ(set_window_info)
1844 user_handle_t handle; /* handle to the window */
1845 unsigned int flags; /* flags for fields to set (see below) */
1846 unsigned int style; /* window style */
1847 unsigned int ex_style; /* window extended style */
1848 unsigned int id; /* window id */
1849 void* instance; /* creator instance */
1850 int is_unicode; /* ANSI or unicode */
1851 void* user_data; /* user-specific data */
1852 int extra_offset; /* offset to set in extra bytes */
1853 size_t extra_size; /* size to set in extra bytes */
1854 unsigned int extra_value; /* value to set in extra bytes */
1855 @REPLY
1856 unsigned int old_style; /* old window style */
1857 unsigned int old_ex_style; /* old window extended style */
1858 unsigned int old_id; /* old window id */
1859 void* old_instance; /* old creator instance */
1860 void* old_user_data; /* old user-specific data */
1861 unsigned int old_extra_value; /* old value in extra bytes */
1862 @END
1863 #define SET_WIN_STYLE 0x01
1864 #define SET_WIN_EXSTYLE 0x02
1865 #define SET_WIN_ID 0x04
1866 #define SET_WIN_INSTANCE 0x08
1867 #define SET_WIN_USERDATA 0x10
1868 #define SET_WIN_EXTRA 0x20
1869 #define SET_WIN_UNICODE 0x40
1872 /* Set the parent of a window */
1873 @REQ(set_parent)
1874 user_handle_t handle; /* handle to the window */
1875 user_handle_t parent; /* handle to the parent */
1876 @REPLY
1877 user_handle_t old_parent; /* old parent window */
1878 user_handle_t full_parent; /* full handle of new parent */
1879 @END
1882 /* Get a list of the window parents, up to the root of the tree */
1883 @REQ(get_window_parents)
1884 user_handle_t handle; /* handle to the window */
1885 @REPLY
1886 int count; /* total count of parents */
1887 VARARG(parents,user_handles); /* parent handles */
1888 @END
1891 /* Get a list of the window children */
1892 @REQ(get_window_children)
1893 user_handle_t parent; /* parent window */
1894 atom_t atom; /* class atom for the listed children */
1895 thread_id_t tid; /* thread owning the listed children */
1896 @REPLY
1897 int count; /* total count of children */
1898 VARARG(children,user_handles); /* children handles */
1899 @END
1902 /* Get a list of the window children that contain a given point */
1903 @REQ(get_window_children_from_point)
1904 user_handle_t parent; /* parent window */
1905 int x; /* point in parent coordinates */
1906 int y;
1907 @REPLY
1908 int count; /* total count of children */
1909 VARARG(children,user_handles); /* children handles */
1910 @END
1913 /* Get window tree information from a window handle */
1914 @REQ(get_window_tree)
1915 user_handle_t handle; /* handle to the window */
1916 @REPLY
1917 user_handle_t parent; /* parent window */
1918 user_handle_t owner; /* owner window */
1919 user_handle_t next_sibling; /* next sibling in Z-order */
1920 user_handle_t prev_sibling; /* prev sibling in Z-order */
1921 user_handle_t first_sibling; /* first sibling in Z-order */
1922 user_handle_t last_sibling; /* last sibling in Z-order */
1923 user_handle_t first_child; /* first child */
1924 user_handle_t last_child; /* last child */
1925 @END
1927 /* Set the position and Z order of a window */
1928 @REQ(set_window_pos)
1929 user_handle_t handle; /* handle to the window */
1930 user_handle_t previous; /* previous window in Z order */
1931 unsigned int flags; /* SWP_* flags */
1932 rectangle_t window; /* window rectangle */
1933 rectangle_t client; /* client rectangle */
1934 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1935 @REPLY
1936 unsigned int new_style; /* new window style */
1937 @END
1940 /* Get the window and client rectangles of a window */
1941 @REQ(get_window_rectangles)
1942 user_handle_t handle; /* handle to the window */
1943 @REPLY
1944 rectangle_t window; /* window rectangle */
1945 rectangle_t visible; /* visible part of the window rectangle */
1946 rectangle_t client; /* client rectangle */
1947 @END
1950 /* Get the window text */
1951 @REQ(get_window_text)
1952 user_handle_t handle; /* handle to the window */
1953 @REPLY
1954 VARARG(text,unicode_str); /* window text */
1955 @END
1958 /* Set the window text */
1959 @REQ(set_window_text)
1960 user_handle_t handle; /* handle to the window */
1961 VARARG(text,unicode_str); /* window text */
1962 @END
1965 /* Get the coordinates offset between two windows */
1966 @REQ(get_windows_offset)
1967 user_handle_t from; /* handle to the first window */
1968 user_handle_t to; /* handle to the second window */
1969 @REPLY
1970 int x; /* x coordinate offset */
1971 int y; /* y coordinate offset */
1972 @END
1975 /* Get the visible region of a window */
1976 @REQ(get_visible_region)
1977 user_handle_t window; /* handle to the window */
1978 unsigned int flags; /* DCX flags */
1979 @REPLY
1980 user_handle_t top_win; /* top window to clip against */
1981 int top_org_x; /* top window visible rect origin in screen coords */
1982 int top_org_y;
1983 int win_org_x; /* window rect origin in screen coords */
1984 int win_org_y;
1985 size_t total_size; /* total size of the resulting region */
1986 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
1987 @END
1990 /* Get the window region */
1991 @REQ(get_window_region)
1992 user_handle_t window; /* handle to the window */
1993 @REPLY
1994 size_t total_size; /* total size of the resulting region */
1995 VARARG(region,rectangles); /* list of rectangles for the region */
1996 @END
1999 /* Set the window region */
2000 @REQ(set_window_region)
2001 user_handle_t window; /* handle to the window */
2002 VARARG(region,rectangles); /* list of rectangles for the region */
2003 @END
2006 /* Get the window update region */
2007 @REQ(get_update_region)
2008 user_handle_t window; /* handle to the window */
2009 user_handle_t from_child; /* child to start searching from */
2010 unsigned int flags; /* update flags (see below) */
2011 @REPLY
2012 user_handle_t child; /* child to repaint (or window itself) */
2013 unsigned int flags; /* resulting update flags (see below) */
2014 size_t total_size; /* total size of the resulting region */
2015 VARARG(region,rectangles); /* list of rectangles for the region */
2016 @END
2017 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2018 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2019 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2020 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2021 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2022 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2023 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2026 /* Update the z order of a window so that a given rectangle is fully visible */
2027 @REQ(update_window_zorder)
2028 user_handle_t window; /* handle to the window */
2029 rectangle_t rect; /* rectangle that must be visible */
2030 @END
2033 /* Mark parts of a window as needing a redraw */
2034 @REQ(redraw_window)
2035 user_handle_t window; /* handle to the window */
2036 unsigned int flags; /* RDW_* flags */
2037 VARARG(region,rectangles); /* list of rectangles for the region */
2038 @END
2041 /* Set a window property */
2042 @REQ(set_window_property)
2043 user_handle_t window; /* handle to the window */
2044 atom_t atom; /* property atom (if no name specified) */
2045 obj_handle_t handle; /* handle to store */
2046 VARARG(name,unicode_str); /* property name */
2047 @END
2050 /* Remove a window property */
2051 @REQ(remove_window_property)
2052 user_handle_t window; /* handle to the window */
2053 atom_t atom; /* property atom (if no name specified) */
2054 VARARG(name,unicode_str); /* property name */
2055 @REPLY
2056 obj_handle_t handle; /* handle stored in property */
2057 @END
2060 /* Get a window property */
2061 @REQ(get_window_property)
2062 user_handle_t window; /* handle to the window */
2063 atom_t atom; /* property atom (if no name specified) */
2064 VARARG(name,unicode_str); /* property name */
2065 @REPLY
2066 obj_handle_t handle; /* handle stored in property */
2067 @END
2070 /* Get the list of properties of a window */
2071 @REQ(get_window_properties)
2072 user_handle_t window; /* handle to the window */
2073 @REPLY
2074 int total; /* total number of properties */
2075 VARARG(props,properties); /* list of properties */
2076 @END
2079 /* Create a window station */
2080 @REQ(create_winstation)
2081 unsigned int flags; /* window station flags */
2082 unsigned int access; /* wanted access rights */
2083 unsigned int attributes; /* object attributes */
2084 VARARG(name,unicode_str); /* object name */
2085 @REPLY
2086 obj_handle_t handle; /* handle to the window station */
2087 @END
2090 /* Open a handle to a window station */
2091 @REQ(open_winstation)
2092 unsigned int access; /* wanted access rights */
2093 unsigned int attributes; /* object attributes */
2094 VARARG(name,unicode_str); /* object name */
2095 @REPLY
2096 obj_handle_t handle; /* handle to the window station */
2097 @END
2100 /* Close a window station */
2101 @REQ(close_winstation)
2102 obj_handle_t handle; /* handle to the window station */
2103 @END
2106 /* Get the process current window station */
2107 @REQ(get_process_winstation)
2108 @REPLY
2109 obj_handle_t handle; /* handle to the window station */
2110 @END
2113 /* Set the process current window station */
2114 @REQ(set_process_winstation)
2115 obj_handle_t handle; /* handle to the window station */
2116 @END
2119 /* Create a desktop */
2120 @REQ(create_desktop)
2121 unsigned int flags; /* desktop flags */
2122 unsigned int access; /* wanted access rights */
2123 unsigned int attributes; /* object attributes */
2124 VARARG(name,unicode_str); /* object name */
2125 @REPLY
2126 obj_handle_t handle; /* handle to the desktop */
2127 @END
2130 /* Open a handle to a desktop */
2131 @REQ(open_desktop)
2132 unsigned int flags; /* desktop flags */
2133 unsigned int access; /* wanted access rights */
2134 unsigned int attributes; /* object attributes */
2135 VARARG(name,unicode_str); /* object name */
2136 @REPLY
2137 obj_handle_t handle; /* handle to the desktop */
2138 @END
2141 /* Close a desktop */
2142 @REQ(close_desktop)
2143 obj_handle_t handle; /* handle to the desktop */
2144 @END
2147 /* Get the thread current desktop */
2148 @REQ(get_thread_desktop)
2149 thread_id_t tid; /* thread id */
2150 @REPLY
2151 obj_handle_t handle; /* handle to the desktop */
2152 @END
2155 /* Set the thread current desktop */
2156 @REQ(set_thread_desktop)
2157 obj_handle_t handle; /* handle to the desktop */
2158 @END
2161 /* Get/set information about a user object (window station or desktop) */
2162 @REQ(set_user_object_info)
2163 obj_handle_t handle; /* handle to the object */
2164 unsigned int flags; /* information to set */
2165 unsigned int obj_flags; /* new object flags */
2166 @REPLY
2167 int is_desktop; /* is object a desktop? */
2168 unsigned int old_obj_flags; /* old object flags */
2169 VARARG(name,unicode_str); /* object name */
2170 @END
2171 #define SET_USER_OBJECT_FLAGS 1
2174 /* Attach (or detach) thread inputs */
2175 @REQ(attach_thread_input)
2176 thread_id_t tid_from; /* thread to be attached */
2177 thread_id_t tid_to; /* thread to which tid_from should be attached */
2178 int attach; /* is it an attach? */
2179 @END
2182 /* Get input data for a given thread */
2183 @REQ(get_thread_input)
2184 thread_id_t tid; /* id of thread */
2185 @REPLY
2186 user_handle_t focus; /* handle to the focus window */
2187 user_handle_t capture; /* handle to the capture window */
2188 user_handle_t active; /* handle to the active window */
2189 user_handle_t foreground; /* handle to the global foreground window */
2190 user_handle_t menu_owner; /* handle to the menu owner */
2191 user_handle_t move_size; /* handle to the moving/resizing window */
2192 user_handle_t caret; /* handle to the caret window */
2193 rectangle_t rect; /* caret rectangle */
2194 @END
2197 /* Get the time of the last input event */
2198 @REQ(get_last_input_time)
2199 @REPLY
2200 unsigned int time;
2201 @END
2204 /* Retrieve queue keyboard state for a given thread */
2205 @REQ(get_key_state)
2206 thread_id_t tid; /* id of thread */
2207 int key; /* optional key code or -1 */
2208 @REPLY
2209 unsigned char state; /* state of specified key */
2210 VARARG(keystate,bytes); /* state array for all the keys */
2211 @END
2213 /* Set queue keyboard state for a given thread */
2214 @REQ(set_key_state)
2215 thread_id_t tid; /* id of thread */
2216 VARARG(keystate,bytes); /* state array for all the keys */
2217 @END
2219 /* Set the system foreground window */
2220 @REQ(set_foreground_window)
2221 user_handle_t handle; /* handle to the foreground window */
2222 @REPLY
2223 user_handle_t previous; /* handle to the previous foreground window */
2224 int send_msg_old; /* whether we have to send a msg to the old window */
2225 int send_msg_new; /* whether we have to send a msg to the new window */
2226 @END
2228 /* Set the current thread focus window */
2229 @REQ(set_focus_window)
2230 user_handle_t handle; /* handle to the focus window */
2231 @REPLY
2232 user_handle_t previous; /* handle to the previous focus window */
2233 @END
2235 /* Set the current thread active window */
2236 @REQ(set_active_window)
2237 user_handle_t handle; /* handle to the active window */
2238 @REPLY
2239 user_handle_t previous; /* handle to the previous active window */
2240 @END
2242 /* Set the current thread capture window */
2243 @REQ(set_capture_window)
2244 user_handle_t handle; /* handle to the capture window */
2245 unsigned int flags; /* capture flags (see below) */
2246 @REPLY
2247 user_handle_t previous; /* handle to the previous capture window */
2248 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2249 @END
2250 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2251 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2254 /* Set the current thread caret window */
2255 @REQ(set_caret_window)
2256 user_handle_t handle; /* handle to the caret window */
2257 int width; /* caret width */
2258 int height; /* caret height */
2259 @REPLY
2260 user_handle_t previous; /* handle to the previous caret window */
2261 rectangle_t old_rect; /* previous caret rectangle */
2262 int old_hide; /* previous hide count */
2263 int old_state; /* previous caret state (1=on, 0=off) */
2264 @END
2267 /* Set the current thread caret information */
2268 @REQ(set_caret_info)
2269 unsigned int flags; /* caret flags (see below) */
2270 user_handle_t handle; /* handle to the caret window */
2271 int x; /* caret x position */
2272 int y; /* caret y position */
2273 int hide; /* increment for hide count (can be negative to show it) */
2274 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2275 @REPLY
2276 user_handle_t full_handle; /* handle to the current caret window */
2277 rectangle_t old_rect; /* previous caret rectangle */
2278 int old_hide; /* previous hide count */
2279 int old_state; /* previous caret state (1=on, 0=off) */
2280 @END
2281 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2282 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2283 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2286 /* Set a window hook */
2287 @REQ(set_hook)
2288 int id; /* id of the hook */
2289 process_id_t pid; /* id of process to set the hook into */
2290 thread_id_t tid; /* id of thread to set the hook into */
2291 int event_min;
2292 int event_max;
2293 int flags;
2294 void* proc; /* hook procedure */
2295 int unicode; /* is it a unicode hook? */
2296 VARARG(module,unicode_str); /* module name */
2297 @REPLY
2298 user_handle_t handle; /* handle to the hook */
2299 unsigned int active_hooks; /* active hooks bitmap */
2300 @END
2303 /* Remove a window hook */
2304 @REQ(remove_hook)
2305 user_handle_t handle; /* handle to the hook */
2306 int id; /* id of the hook if handle is 0 */
2307 void* proc; /* hook procedure if handle is 0 */
2308 @REPLY
2309 unsigned int active_hooks; /* active hooks bitmap */
2310 @END
2313 /* Start calling a hook chain */
2314 @REQ(start_hook_chain)
2315 int id; /* id of the hook */
2316 int event; /* signalled event */
2317 user_handle_t window; /* handle to the event window */
2318 int object_id; /* object id for out of context winevent */
2319 int child_id; /* child id for out of context winevent */
2320 @REPLY
2321 user_handle_t handle; /* handle to the next hook */
2322 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2323 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2324 void* proc; /* hook procedure */
2325 int unicode; /* is it a unicode hook? */
2326 unsigned int active_hooks; /* active hooks bitmap */
2327 VARARG(module,unicode_str); /* module name */
2328 @END
2331 /* Finished calling a hook chain */
2332 @REQ(finish_hook_chain)
2333 int id; /* id of the hook */
2334 @END
2337 /* Get the next hook to call */
2338 @REQ(get_next_hook)
2339 user_handle_t handle; /* handle to the current hook */
2340 int event; /* signalled event */
2341 user_handle_t window; /* handle to the event window */
2342 int object_id; /* object id for out of context winevent */
2343 int child_id; /* child id for out of context winevent */
2344 @REPLY
2345 user_handle_t next; /* handle to the next hook */
2346 int id; /* id of the next hook */
2347 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2348 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2349 void* proc; /* next hook procedure */
2350 int prev_unicode; /* was the previous a unicode hook? */
2351 int next_unicode; /* is the next a unicode hook? */
2352 VARARG(module,unicode_str); /* module name */
2353 @END
2356 /* Create a window class */
2357 @REQ(create_class)
2358 int local; /* is it a local class? */
2359 atom_t atom; /* class atom */
2360 unsigned int style; /* class style */
2361 void* instance; /* module instance */
2362 int extra; /* number of extra class bytes */
2363 int win_extra; /* number of window extra bytes */
2364 void* client_ptr; /* pointer to class in client address space */
2365 @END
2368 /* Destroy a window class */
2369 @REQ(destroy_class)
2370 atom_t atom; /* class atom */
2371 void* instance; /* module instance */
2372 @REPLY
2373 void* client_ptr; /* pointer to class in client address space */
2374 @END
2377 /* Set some information in a class */
2378 @REQ(set_class_info)
2379 user_handle_t window; /* handle to the window */
2380 unsigned int flags; /* flags for info to set (see below) */
2381 atom_t atom; /* class atom */
2382 unsigned int style; /* class style */
2383 int win_extra; /* number of window extra bytes */
2384 void* instance; /* module instance */
2385 int extra_offset; /* offset to set in extra bytes */
2386 size_t extra_size; /* size to set in extra bytes */
2387 unsigned long extra_value; /* value to set in extra bytes */
2388 @REPLY
2389 atom_t old_atom; /* previous class atom */
2390 unsigned int old_style; /* previous class style */
2391 int old_extra; /* previous number of class extra bytes */
2392 int old_win_extra; /* previous number of window extra bytes */
2393 void* old_instance; /* previous module instance */
2394 unsigned long old_extra_value; /* old value in extra bytes */
2395 @END
2396 #define SET_CLASS_ATOM 0x0001
2397 #define SET_CLASS_STYLE 0x0002
2398 #define SET_CLASS_WINEXTRA 0x0004
2399 #define SET_CLASS_INSTANCE 0x0008
2400 #define SET_CLASS_EXTRA 0x0010
2403 /* Set/get clipboard information */
2404 @REQ(set_clipboard_info)
2405 unsigned int flags; /* flags for fields to set (see below) */
2406 user_handle_t clipboard; /* clipboard window */
2407 user_handle_t owner; /* clipboard owner */
2408 user_handle_t viewer; /* first clipboard viewer */
2409 unsigned int seqno; /* change sequence number */
2410 @REPLY
2411 unsigned int flags; /* status flags (see below) */
2412 user_handle_t old_clipboard; /* old clipboard window */
2413 user_handle_t old_owner; /* old clipboard owner */
2414 user_handle_t old_viewer; /* old clipboard viewer */
2415 unsigned int seqno; /* current sequence number */
2416 @END
2418 #define SET_CB_OPEN 0x001
2419 #define SET_CB_OWNER 0x002
2420 #define SET_CB_VIEWER 0x004
2421 #define SET_CB_SEQNO 0x008
2422 #define SET_CB_RELOWNER 0x010
2423 #define SET_CB_CLOSE 0x020
2424 #define CB_OPEN 0x040
2425 #define CB_OWNER 0x080
2426 #define CB_PROCESS 0x100
2429 /* Open a security token */
2430 @REQ(open_token)
2431 obj_handle_t handle; /* handle to the thread or process */
2432 unsigned int access; /* access rights to the new token */
2433 unsigned int attributes;/* object attributes */
2434 unsigned int flags; /* flags (see below) */
2435 @REPLY
2436 obj_handle_t token; /* handle to the token */
2437 @END
2438 #define OPEN_TOKEN_THREAD 1
2439 #define OPEN_TOKEN_AS_SELF 2
2442 /* Set/get the global windows */
2443 @REQ(set_global_windows)
2444 unsigned int flags; /* flags for fields to set (see below) */
2445 user_handle_t shell_window; /* handle to the new shell window */
2446 user_handle_t shell_listview; /* handle to the new shell listview window */
2447 user_handle_t progman_window; /* handle to the new program manager window */
2448 user_handle_t taskman_window; /* handle to the new task manager window */
2449 @REPLY
2450 user_handle_t old_shell_window; /* handle to the shell window */
2451 user_handle_t old_shell_listview; /* handle to the shell listview window */
2452 user_handle_t old_progman_window; /* handle to the new program manager window */
2453 user_handle_t old_taskman_window; /* handle to the new task manager window */
2454 @END
2455 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2456 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2457 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2459 /* Adjust the privileges held by a token */
2460 @REQ(adjust_token_privileges)
2461 obj_handle_t handle; /* handle to the token */
2462 int disable_all; /* disable all privileges? */
2463 int get_modified_state; /* get modified privileges? */
2464 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2465 @REPLY
2466 unsigned int len; /* total length in bytes required to store token privileges */
2467 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2468 @END
2470 /* Retrieves the set of privileges held by or available to a token */
2471 @REQ(get_token_privileges)
2472 obj_handle_t handle; /* handle to the token */
2473 @REPLY
2474 unsigned int len; /* total length in bytes required to store token privileges */
2475 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2476 @END
2478 /* Check the token has the required privileges */
2479 @REQ(check_token_privileges)
2480 obj_handle_t handle; /* handle to the token */
2481 int all_required; /* are all the privileges required for the check to succeed? */
2482 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2483 @REPLY
2484 int has_privileges; /* does the token have the required privileges? */
2485 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2486 @END
2488 @REQ(duplicate_token)
2489 obj_handle_t handle; /* handle to the token to duplicate */
2490 unsigned int access; /* access rights to the new token */
2491 unsigned int attributes; /* object attributes */
2492 int primary; /* is the new token to be a primary one? */
2493 int impersonation_level; /* impersonation level of the new token */
2494 @REPLY
2495 obj_handle_t new_handle; /* duplicated handle */
2496 @END
2498 @REQ(access_check)
2499 obj_handle_t handle; /* handle to the token */
2500 unsigned int desired_access; /* desired access to the object */
2501 unsigned int mapping_read; /* mapping from generic read to specific rights */
2502 unsigned int mapping_write; /* mapping from generic write to specific rights */
2503 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2504 unsigned int mapping_all; /* mapping from generic all to specific rights */
2505 VARARG(sd,security_descriptor); /* security descriptor to check */
2506 @REPLY
2507 unsigned int access_granted; /* access rights actually granted */
2508 unsigned int access_status; /* was access granted? */
2509 unsigned int privileges_len; /* length needed to store privileges */
2510 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2511 @END
2513 @REQ(get_token_user)
2514 obj_handle_t handle; /* handle to the token */
2515 @REPLY
2516 size_t user_len; /* length needed to store user */
2517 VARARG(user,SID); /* sid of the user the token represents */
2518 @END
2520 @REQ(get_token_groups)
2521 obj_handle_t handle; /* handle to the token */
2522 @REPLY
2523 size_t user_len; /* length needed to store user */
2524 VARARG(user,token_groups); /* groups the token's user belongs to */
2525 @END
2527 /* Create a mailslot */
2528 @REQ(create_mailslot)
2529 unsigned int access; /* wanted access rights */
2530 unsigned int attributes; /* object attributes */
2531 obj_handle_t rootdir; /* root directory */
2532 unsigned int max_msgsize;
2533 int read_timeout;
2534 VARARG(name,unicode_str); /* mailslot name */
2535 @REPLY
2536 obj_handle_t handle; /* handle to the mailslot */
2537 @END
2540 /* Open an existing mailslot */
2541 @REQ(open_mailslot)
2542 unsigned int access;
2543 unsigned int attributes; /* object attributes */
2544 obj_handle_t rootdir; /* root directory */
2545 unsigned int sharing; /* sharing mode */
2546 VARARG(name,unicode_str); /* mailslot name */
2547 @REPLY
2548 obj_handle_t handle; /* handle to the mailslot */
2549 @END
2552 /* Set mailslot information */
2553 @REQ(set_mailslot_info)
2554 obj_handle_t handle; /* handle to the mailslot */
2555 unsigned int flags;
2556 int read_timeout;
2557 @REPLY
2558 unsigned int max_msgsize;
2559 int read_timeout;
2560 unsigned int msg_count;
2561 unsigned int next_msgsize;
2562 @END
2563 #define MAILSLOT_SET_READ_TIMEOUT 1
2566 /* Create a directory object */
2567 @REQ(create_directory)
2568 unsigned int access; /* access flags */
2569 unsigned int attributes; /* object attributes */
2570 obj_handle_t rootdir; /* root directory */
2571 VARARG(directory_name,unicode_str); /* Directory name */
2572 @REPLY
2573 obj_handle_t handle; /* handle to the directory */
2574 @END
2577 /* Open a directory object */
2578 @REQ(open_directory)
2579 unsigned int access; /* access flags */
2580 unsigned int attributes; /* object attributes */
2581 obj_handle_t rootdir; /* root directory */
2582 VARARG(directory_name,unicode_str); /* Directory name */
2583 @REPLY
2584 obj_handle_t handle; /* handle to the directory */
2585 @END
2588 /* Create a symbolic link object */
2589 @REQ(create_symlink)
2590 unsigned int access; /* access flags */
2591 unsigned int attributes; /* object attributes */
2592 obj_handle_t rootdir; /* root directory */
2593 size_t name_len; /* length of the symlink name in bytes */
2594 VARARG(name,unicode_str,name_len); /* symlink name */
2595 VARARG(target_name,unicode_str); /* target name */
2596 @REPLY
2597 obj_handle_t handle; /* handle to the symlink */
2598 @END
2601 /* Open a symbolic link object */
2602 @REQ(open_symlink)
2603 unsigned int access; /* access flags */
2604 unsigned int attributes; /* object attributes */
2605 obj_handle_t rootdir; /* root directory */
2606 VARARG(name,unicode_str); /* symlink name */
2607 @REPLY
2608 obj_handle_t handle; /* handle to the symlink */
2609 @END
2612 /* Query a symbolic link object */
2613 @REQ(query_symlink)
2614 obj_handle_t handle; /* handle to the symlink */
2615 @REPLY
2616 VARARG(target_name,unicode_str); /* target name */
2617 @END