crypt32: Fix certificate adding
[wine/wine-kai.git] / server / protocol.def
blob5db269ac41895f1b7afb4bbba56dfc1bf74ffd42
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 unsigned 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 unsigned int process_access; /* access rights for process object */
219 unsigned int process_attr; /* attributes for process object */
220 unsigned int thread_access; /* access rights for thread object */
221 unsigned int thread_attr; /* attributes for thread object */
222 @REPLY
223 process_id_t pid; /* process id */
224 obj_handle_t phandle; /* process handle (in the current process) */
225 thread_id_t tid; /* thread id */
226 obj_handle_t thandle; /* thread handle (in the current process) */
227 int success; /* did the process start successfully? */
228 @END
231 /* Create a new thread from the context of the parent */
232 @REQ(new_thread)
233 unsigned int access; /* wanted access rights */
234 unsigned int attributes; /* object attributes */
235 int suspend; /* new thread should be suspended on creation */
236 int request_fd; /* fd for request pipe */
237 @REPLY
238 thread_id_t tid; /* thread id */
239 obj_handle_t handle; /* thread handle (in the current process) */
240 @END
243 /* Retrieve the new process startup info */
244 @REQ(get_startup_info)
245 @REPLY
246 obj_handle_t exe_file; /* file handle for main exe */
247 obj_handle_t hstdin; /* handle for stdin */
248 obj_handle_t hstdout; /* handle for stdout */
249 obj_handle_t hstderr; /* handle for stderr */
250 VARARG(info,startup_info); /* startup information */
251 VARARG(env,unicode_str); /* environment */
252 @END
255 /* Signal the end of the process initialization */
256 @REQ(init_process_done)
257 void* module; /* main module base address */
258 void* entry; /* process entry point */
259 int gui; /* is it a GUI process? */
260 @END
263 /* Initialize a thread; called from the child after fork()/clone() */
264 @REQ(init_thread)
265 int unix_pid; /* Unix pid of new thread */
266 int unix_tid; /* Unix tid of new thread */
267 void* teb; /* TEB of new thread (in thread address space) */
268 void* peb; /* address of PEB (in thread address space) */
269 void* entry; /* thread entry point (in thread address space) */
270 void* ldt_copy; /* address of LDT copy (in thread address space) */
271 int reply_fd; /* fd for reply pipe */
272 int wait_fd; /* fd for blocking calls pipe */
273 int debug_level; /* new debug level */
274 @REPLY
275 process_id_t pid; /* process id of the new thread's process */
276 thread_id_t tid; /* thread id of the new thread */
277 size_t info_size; /* total size of startup info */
278 time_t server_start; /* server start time */
279 int version; /* protocol version */
280 @END
283 /* Terminate a process */
284 @REQ(terminate_process)
285 obj_handle_t handle; /* process handle to terminate */
286 int exit_code; /* process exit code */
287 @REPLY
288 int self; /* suicide? */
289 @END
292 /* Terminate a thread */
293 @REQ(terminate_thread)
294 obj_handle_t handle; /* thread handle to terminate */
295 int exit_code; /* thread exit code */
296 @REPLY
297 int self; /* suicide? */
298 int last; /* last thread in this process? */
299 @END
302 /* Retrieve information about a process */
303 @REQ(get_process_info)
304 obj_handle_t handle; /* process handle */
305 @REPLY
306 process_id_t pid; /* server process id */
307 process_id_t ppid; /* server process id of parent */
308 int exit_code; /* process exit code */
309 int priority; /* priority class */
310 int affinity; /* process affinity mask */
311 void* peb; /* PEB address in process address space */
312 @END
315 /* Set a process informations */
316 @REQ(set_process_info)
317 obj_handle_t handle; /* process handle */
318 int mask; /* setting mask (see below) */
319 int priority; /* priority class */
320 int affinity; /* affinity mask */
321 @END
322 #define SET_PROCESS_INFO_PRIORITY 0x01
323 #define SET_PROCESS_INFO_AFFINITY 0x02
326 /* Retrieve information about a thread */
327 @REQ(get_thread_info)
328 obj_handle_t handle; /* thread handle */
329 thread_id_t tid_in; /* thread id (optional) */
330 @REPLY
331 process_id_t pid; /* server process id */
332 thread_id_t tid; /* server thread id */
333 void* teb; /* thread teb pointer */
334 int exit_code; /* thread exit code */
335 int priority; /* thread priority level */
336 int affinity; /* thread affinity mask */
337 time_t creation_time; /* thread creation time */
338 time_t exit_time; /* thread exit time */
339 @END
342 /* Set a thread informations */
343 @REQ(set_thread_info)
344 obj_handle_t handle; /* thread handle */
345 int mask; /* setting mask (see below) */
346 int priority; /* priority class */
347 int affinity; /* affinity mask */
348 obj_handle_t token; /* impersonation token */
349 @END
350 #define SET_THREAD_INFO_PRIORITY 0x01
351 #define SET_THREAD_INFO_AFFINITY 0x02
352 #define SET_THREAD_INFO_TOKEN 0x04
355 /* Retrieve information about a module */
356 @REQ(get_dll_info)
357 obj_handle_t handle; /* process handle */
358 void* base_address; /* base address of module */
359 @REPLY
360 size_t size; /* module size */
361 void* entry_point;
362 VARARG(filename,unicode_str); /* file name of module */
363 @END
366 /* Suspend a thread */
367 @REQ(suspend_thread)
368 obj_handle_t handle; /* thread handle */
369 @REPLY
370 int count; /* new suspend count */
371 @END
374 /* Resume a thread */
375 @REQ(resume_thread)
376 obj_handle_t handle; /* thread handle */
377 @REPLY
378 int count; /* new suspend count */
379 @END
382 /* Notify the server that a dll has been loaded */
383 @REQ(load_dll)
384 obj_handle_t handle; /* file handle */
385 void* base; /* base address */
386 size_t size; /* dll size */
387 int dbg_offset; /* debug info offset */
388 int dbg_size; /* debug info size */
389 void* name; /* ptr to ptr to name (in process addr space) */
390 VARARG(filename,unicode_str); /* file name of dll */
391 @END
394 /* Notify the server that a dll is being unloaded */
395 @REQ(unload_dll)
396 void* base; /* base address */
397 @END
400 /* Queue an APC for a thread */
401 @REQ(queue_apc)
402 obj_handle_t handle; /* thread handle */
403 int user; /* user or system apc? */
404 void* func; /* function to call */
405 void* arg1; /* params for function to call */
406 void* arg2;
407 void* arg3;
408 @END
411 /* Get next APC to call */
412 @REQ(get_apc)
413 int alertable; /* is thread alertable? */
414 @REPLY
415 void* func; /* function to call */
416 int type; /* function type */
417 void* arg1; /* function arguments */
418 void* arg2;
419 void* arg3;
420 @END
421 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
424 /* Close a handle for the current process */
425 @REQ(close_handle)
426 obj_handle_t handle; /* handle to close */
427 @REPLY
428 int fd; /* associated fd to close */
429 @END
432 /* Set a handle information */
433 @REQ(set_handle_info)
434 obj_handle_t handle; /* handle we are interested in */
435 int flags; /* new handle flags */
436 int mask; /* mask for flags to set */
437 @REPLY
438 int old_flags; /* old flag value */
439 @END
442 /* Duplicate a handle */
443 @REQ(dup_handle)
444 obj_handle_t src_process; /* src process handle */
445 obj_handle_t src_handle; /* src handle to duplicate */
446 obj_handle_t dst_process; /* dst process handle */
447 unsigned int access; /* wanted access rights */
448 unsigned int attributes; /* object attributes */
449 unsigned int options; /* duplicate options (see below) */
450 @REPLY
451 obj_handle_t handle; /* duplicated handle in dst process */
452 int fd; /* associated fd to close */
453 @END
454 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
455 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
456 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
459 /* Open a handle to a process */
460 @REQ(open_process)
461 process_id_t pid; /* process id to open */
462 unsigned int access; /* wanted access rights */
463 unsigned int attributes; /* object attributes */
464 @REPLY
465 obj_handle_t handle; /* handle to the process */
466 @END
469 /* Open a handle to a thread */
470 @REQ(open_thread)
471 thread_id_t tid; /* thread id to open */
472 unsigned int access; /* wanted access rights */
473 unsigned int attributes; /* object attributes */
474 @REPLY
475 obj_handle_t handle; /* handle to the thread */
476 @END
479 /* Wait for handles */
480 @REQ(select)
481 int flags; /* wait flags (see below) */
482 void* cookie; /* magic cookie to return to client */
483 obj_handle_t signal; /* object to signal (0 if none) */
484 abs_time_t timeout; /* absolute timeout */
485 VARARG(handles,handles); /* handles to select on */
486 @END
487 #define SELECT_ALL 1
488 #define SELECT_ALERTABLE 2
489 #define SELECT_INTERRUPTIBLE 4
490 #define SELECT_TIMEOUT 8
493 /* Create an event */
494 @REQ(create_event)
495 unsigned int access; /* wanted access rights */
496 unsigned int attributes; /* object attributes */
497 obj_handle_t rootdir; /* root directory */
498 int manual_reset; /* manual reset event */
499 int initial_state; /* initial state of the event */
500 VARARG(name,unicode_str); /* object name */
501 @REPLY
502 obj_handle_t handle; /* handle to the event */
503 @END
505 /* Event operation */
506 @REQ(event_op)
507 obj_handle_t handle; /* handle to event */
508 int op; /* event operation (see below) */
509 @END
510 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
513 /* Open an event */
514 @REQ(open_event)
515 unsigned int access; /* wanted access rights */
516 unsigned int attributes; /* object attributes */
517 obj_handle_t rootdir; /* root directory */
518 VARARG(name,unicode_str); /* object name */
519 @REPLY
520 obj_handle_t handle; /* handle to the event */
521 @END
524 /* Create a mutex */
525 @REQ(create_mutex)
526 unsigned int access; /* wanted access rights */
527 unsigned int attributes; /* object attributes */
528 obj_handle_t rootdir; /* root directory */
529 int owned; /* initially owned? */
530 VARARG(name,unicode_str); /* object name */
531 @REPLY
532 obj_handle_t handle; /* handle to the mutex */
533 @END
536 /* Release a mutex */
537 @REQ(release_mutex)
538 obj_handle_t handle; /* handle to the mutex */
539 @REPLY
540 unsigned int prev_count; /* value of internal counter, before release */
541 @END
544 /* Open a mutex */
545 @REQ(open_mutex)
546 unsigned int access; /* wanted access rights */
547 unsigned int attributes; /* object attributes */
548 obj_handle_t rootdir; /* root directory */
549 VARARG(name,unicode_str); /* object name */
550 @REPLY
551 obj_handle_t handle; /* handle to the mutex */
552 @END
555 /* Create a semaphore */
556 @REQ(create_semaphore)
557 unsigned int access; /* wanted access rights */
558 unsigned int attributes; /* object attributes */
559 obj_handle_t rootdir; /* root directory */
560 unsigned int initial; /* initial count */
561 unsigned int max; /* maximum count */
562 VARARG(name,unicode_str); /* object name */
563 @REPLY
564 obj_handle_t handle; /* handle to the semaphore */
565 @END
568 /* Release a semaphore */
569 @REQ(release_semaphore)
570 obj_handle_t handle; /* handle to the semaphore */
571 unsigned int count; /* count to add to semaphore */
572 @REPLY
573 unsigned int prev_count; /* previous semaphore count */
574 @END
577 /* Open a semaphore */
578 @REQ(open_semaphore)
579 unsigned int access; /* wanted access rights */
580 unsigned int attributes; /* object attributes */
581 obj_handle_t rootdir; /* root directory */
582 VARARG(name,unicode_str); /* object name */
583 @REPLY
584 obj_handle_t handle; /* handle to the semaphore */
585 @END
588 /* Create a file */
589 @REQ(create_file)
590 unsigned int access; /* wanted access rights */
591 unsigned int attributes; /* object attributes */
592 unsigned int sharing; /* sharing flags */
593 int create; /* file create action */
594 unsigned int options; /* file options */
595 unsigned int attrs; /* file attributes for creation */
596 VARARG(filename,string); /* file name */
597 @REPLY
598 obj_handle_t handle; /* handle to the file */
599 @END
602 /* Open a file object */
603 @REQ(open_file_object)
604 unsigned int access; /* wanted access rights */
605 unsigned int attributes; /* open attributes */
606 obj_handle_t rootdir; /* root directory */
607 unsigned int sharing; /* sharing flags */
608 VARARG(filename,unicode_str); /* file name */
609 @REPLY
610 obj_handle_t handle; /* handle to the file */
611 @END
614 /* Allocate a file handle for a Unix fd */
615 @REQ(alloc_file_handle)
616 unsigned int access; /* wanted access rights */
617 unsigned int attributes; /* object attributes */
618 int fd; /* file descriptor on the client side */
619 @REPLY
620 obj_handle_t handle; /* handle to the file */
621 @END
624 /* Get a Unix fd to access a file */
625 @REQ(get_handle_fd)
626 obj_handle_t handle; /* handle to the file */
627 unsigned int access; /* wanted access rights */
628 @REPLY
629 int fd; /* file descriptor */
630 int removable; /* is device removable? (-1 if unknown) */
631 int flags; /* file read/write flags (see below) */
632 @END
633 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
634 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
635 #define FD_FLAG_RECV_SHUTDOWN 0x04
636 #define FD_FLAG_SEND_SHUTDOWN 0x08
637 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
638 * only handle available data (don't wait) */
640 /* Set the cached file descriptor of a handle */
641 @REQ(set_handle_fd)
642 obj_handle_t handle; /* handle we are interested in */
643 int fd; /* file descriptor */
644 int removable; /* is device removable? (-1 if unknown) */
645 @REPLY
646 int cur_fd; /* current file descriptor */
647 @END
650 /* Flush a file buffers */
651 @REQ(flush_file)
652 obj_handle_t handle; /* handle to the file */
653 @REPLY
654 obj_handle_t event; /* event set when finished */
655 @END
658 /* Lock a region of a file */
659 @REQ(lock_file)
660 obj_handle_t handle; /* handle to the file */
661 unsigned int offset_low; /* offset of start of lock */
662 unsigned int offset_high; /* offset of start of lock */
663 unsigned int count_low; /* count of bytes to lock */
664 unsigned int count_high; /* count of bytes to lock */
665 int shared; /* shared or exclusive lock? */
666 int wait; /* do we want to wait? */
667 @REPLY
668 obj_handle_t handle; /* handle to wait on */
669 int overlapped; /* is it an overlapped I/O handle? */
670 @END
673 /* Unlock a region of a file */
674 @REQ(unlock_file)
675 obj_handle_t handle; /* handle to the file */
676 unsigned int offset_low; /* offset of start of unlock */
677 unsigned int offset_high; /* offset of start of unlock */
678 unsigned int count_low; /* count of bytes to unlock */
679 unsigned int count_high; /* count of bytes to unlock */
680 @END
683 /* Get ready to unmount a Unix device */
684 @REQ(unmount_device)
685 obj_handle_t handle; /* handle to a file on the device */
686 @END
689 /* Create a socket */
690 @REQ(create_socket)
691 unsigned int access; /* wanted access rights */
692 unsigned int attributes; /* object attributes */
693 int family; /* family, see socket manpage */
694 int type; /* type, see socket manpage */
695 int protocol; /* protocol, see socket manpage */
696 unsigned int flags; /* socket flags */
697 @REPLY
698 obj_handle_t handle; /* handle to the new socket */
699 @END
702 /* Accept a socket */
703 @REQ(accept_socket)
704 obj_handle_t lhandle; /* handle to the listening socket */
705 unsigned int access; /* wanted access rights */
706 unsigned int attributes; /* object attributes */
707 @REPLY
708 obj_handle_t handle; /* handle to the new socket */
709 @END
712 /* Set socket event parameters */
713 @REQ(set_socket_event)
714 obj_handle_t handle; /* handle to the socket */
715 unsigned int mask; /* event mask */
716 obj_handle_t event; /* event object */
717 user_handle_t window; /* window to send the message to */
718 unsigned int msg; /* message to send */
719 @END
722 /* Get socket event parameters */
723 @REQ(get_socket_event)
724 obj_handle_t handle; /* handle to the socket */
725 int service; /* clear pending? */
726 obj_handle_t c_event; /* event to clear */
727 @REPLY
728 unsigned int mask; /* event mask */
729 unsigned int pmask; /* pending events */
730 unsigned int state; /* status bits */
731 VARARG(errors,ints); /* event errors */
732 @END
735 /* Reenable pending socket events */
736 @REQ(enable_socket_event)
737 obj_handle_t handle; /* handle to the socket */
738 unsigned int mask; /* events to re-enable */
739 unsigned int sstate; /* status bits to set */
740 unsigned int cstate; /* status bits to clear */
741 @END
743 @REQ(set_socket_deferred)
744 obj_handle_t handle; /* handle to the socket */
745 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
746 @END
748 /* Allocate a console (only used by a console renderer) */
749 @REQ(alloc_console)
750 unsigned int access; /* wanted access rights */
751 unsigned int attributes; /* object attributes */
752 process_id_t pid; /* pid of process which shall be attached to the console */
753 @REPLY
754 obj_handle_t handle_in; /* handle to console input */
755 obj_handle_t event; /* handle to renderer events change notification */
756 @END
759 /* Free the console of the current process */
760 @REQ(free_console)
761 @END
764 #define CONSOLE_RENDERER_NONE_EVENT 0x00
765 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
766 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
767 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
768 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
769 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
770 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
771 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
772 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
773 struct console_renderer_event
775 short event;
776 union
778 struct update
780 short top;
781 short bottom;
782 } update;
783 struct resize
785 short width;
786 short height;
787 } resize;
788 struct cursor_pos
790 short x;
791 short y;
792 } cursor_pos;
793 struct cursor_geom
795 short visible;
796 short size;
797 } cursor_geom;
798 struct display
800 short left;
801 short top;
802 short width;
803 short height;
804 } display;
805 } u;
808 /* retrieve console events for the renderer */
809 @REQ(get_console_renderer_events)
810 obj_handle_t handle; /* handle to console input events */
811 @REPLY
812 VARARG(data,bytes); /* the various console_renderer_events */
813 @END
816 /* Open a handle to the process console */
817 @REQ(open_console)
818 int from; /* 0 (resp 1) input (resp output) of current process console */
819 /* otherwise console_in handle to get active screen buffer? */
820 unsigned int access; /* wanted access rights */
821 unsigned int attributes; /* object attributes */
822 int share; /* share mask (only for output handles) */
823 @REPLY
824 obj_handle_t handle; /* handle to the console */
825 @END
828 /* Get the input queue wait event */
829 @REQ(get_console_wait_event)
830 @REPLY
831 obj_handle_t handle;
832 @END
834 /* Get a console mode (input or output) */
835 @REQ(get_console_mode)
836 obj_handle_t handle; /* handle to the console */
837 @REPLY
838 int mode; /* console mode */
839 @END
842 /* Set a console mode (input or output) */
843 @REQ(set_console_mode)
844 obj_handle_t handle; /* handle to the console */
845 int mode; /* console mode */
846 @END
849 /* Set info about a console (input only) */
850 @REQ(set_console_input_info)
851 obj_handle_t handle; /* handle to console input, or 0 for process' console */
852 int mask; /* setting mask (see below) */
853 obj_handle_t active_sb; /* active screen buffer */
854 int history_mode; /* whether we duplicate lines in history */
855 int history_size; /* number of lines in history */
856 int edition_mode; /* index to the edition mode flavors */
857 VARARG(title,unicode_str); /* console title */
858 @END
859 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
860 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
861 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
862 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
863 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
866 /* Get info about a console (input only) */
867 @REQ(get_console_input_info)
868 obj_handle_t handle; /* handle to console input, or 0 for process' console */
869 @REPLY
870 int history_mode; /* whether we duplicate lines in history */
871 int history_size; /* number of lines in history */
872 int history_index; /* number of used lines in history */
873 int edition_mode; /* index to the edition mode flavors */
874 VARARG(title,unicode_str); /* console title */
875 @END
878 /* appends a string to console's history */
879 @REQ(append_console_input_history)
880 obj_handle_t handle; /* handle to console input, or 0 for process' console */
881 VARARG(line,unicode_str); /* line to add */
882 @END
885 /* appends a string to console's history */
886 @REQ(get_console_input_history)
887 obj_handle_t handle; /* handle to console input, or 0 for process' console */
888 int index; /* index to get line from */
889 @REPLY
890 int total; /* total length of line in Unicode chars */
891 VARARG(line,unicode_str); /* line to add */
892 @END
895 /* creates a new screen buffer on process' console */
896 @REQ(create_console_output)
897 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
898 unsigned int access; /* wanted access rights */
899 unsigned int attributes; /* object attributes */
900 unsigned int share; /* sharing credentials */
901 @REPLY
902 obj_handle_t handle_out; /* handle to the screen buffer */
903 @END
906 /* Set info about a console (output only) */
907 @REQ(set_console_output_info)
908 obj_handle_t handle; /* handle to the console */
909 int mask; /* setting mask (see below) */
910 short int cursor_size; /* size of cursor (percentage filled) */
911 short int cursor_visible;/* cursor visibility flag */
912 short int cursor_x; /* position of cursor (x, y) */
913 short int cursor_y;
914 short int width; /* width of the screen buffer */
915 short int height; /* height of the screen buffer */
916 short int attr; /* default attribute */
917 short int win_left; /* window actually displayed by renderer */
918 short int win_top; /* the rect area is expressed withing the */
919 short int win_right; /* boundaries of the screen buffer */
920 short int win_bottom;
921 short int max_width; /* maximum size (width x height) for the window */
922 short int max_height;
923 @END
924 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
925 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
926 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
927 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
928 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
929 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
932 /* Get info about a console (output only) */
933 @REQ(get_console_output_info)
934 obj_handle_t handle; /* handle to the console */
935 @REPLY
936 short int cursor_size; /* size of cursor (percentage filled) */
937 short int cursor_visible;/* cursor visibility flag */
938 short int cursor_x; /* position of cursor (x, y) */
939 short int cursor_y;
940 short int width; /* width of the screen buffer */
941 short int height; /* height of the screen buffer */
942 short int attr; /* default attribute */
943 short int win_left; /* window actually displayed by renderer */
944 short int win_top; /* the rect area is expressed withing the */
945 short int win_right; /* boundaries of the screen buffer */
946 short int win_bottom;
947 short int max_width; /* maximum size (width x height) for the window */
948 short int max_height;
949 @END
951 /* Add input records to a console input queue */
952 @REQ(write_console_input)
953 obj_handle_t handle; /* handle to the console input */
954 VARARG(rec,input_records); /* input records */
955 @REPLY
956 int written; /* number of records written */
957 @END
960 /* Fetch input records from a console input queue */
961 @REQ(read_console_input)
962 obj_handle_t handle; /* handle to the console input */
963 int flush; /* flush the retrieved records from the queue? */
964 @REPLY
965 int read; /* number of records read */
966 VARARG(rec,input_records); /* input records */
967 @END
970 /* write data (chars and/or attributes) in a screen buffer */
971 @REQ(write_console_output)
972 obj_handle_t handle; /* handle to the console output */
973 int x; /* position where to start writing */
974 int y;
975 int mode; /* char info (see below) */
976 int wrap; /* wrap around at end of line? */
977 VARARG(data,bytes); /* info to write */
978 @REPLY
979 int written; /* number of char infos actually written */
980 int width; /* width of screen buffer */
981 int height; /* height of screen buffer */
982 @END
983 enum char_info_mode
985 CHAR_INFO_MODE_TEXT, /* characters only */
986 CHAR_INFO_MODE_ATTR, /* attributes only */
987 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
988 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
992 /* fill a screen buffer with constant data (chars and/or attributes) */
993 @REQ(fill_console_output)
994 obj_handle_t handle; /* handle to the console output */
995 int x; /* position where to start writing */
996 int y;
997 int mode; /* char info mode */
998 int count; /* number to write */
999 int wrap; /* wrap around at end of line? */
1000 char_info_t data; /* data to write */
1001 @REPLY
1002 int written; /* number of char infos actually written */
1003 @END
1006 /* read data (chars and/or attributes) from a screen buffer */
1007 @REQ(read_console_output)
1008 obj_handle_t handle; /* handle to the console output */
1009 int x; /* position (x,y) where to start reading */
1010 int y;
1011 int mode; /* char info mode */
1012 int wrap; /* wrap around at end of line? */
1013 @REPLY
1014 int width; /* width of screen buffer */
1015 int height; /* height of screen buffer */
1016 VARARG(data,bytes);
1017 @END
1020 /* move a rect (of data) in screen buffer content */
1021 @REQ(move_console_output)
1022 obj_handle_t handle; /* handle to the console output */
1023 short int x_src; /* position (x, y) of rect to start moving from */
1024 short int y_src;
1025 short int x_dst; /* position (x, y) of rect to move to */
1026 short int y_dst;
1027 short int w; /* size of the rect (width, height) to move */
1028 short int h;
1029 @END
1032 /* Sends a signal to a process group */
1033 @REQ(send_console_signal)
1034 int signal; /* the signal to send */
1035 process_id_t group_id; /* the group to send the signal to */
1036 @END
1039 /* enable directory change notifications */
1040 @REQ(read_directory_changes)
1041 obj_handle_t handle; /* handle to the directory */
1042 obj_handle_t event; /* handle to the event */
1043 unsigned int filter; /* notification filter */
1044 int subtree; /* watch the subtree? */
1045 int want_data; /* flag indicating whether change data should be collected */
1046 void* io_apc; /* APC routine to queue upon end of async */
1047 void* io_sb; /* I/O status block (unique across all async on this handle) */
1048 void* io_user; /* data to pass back to caller */
1049 @END
1052 @REQ(read_change)
1053 obj_handle_t handle;
1054 @REPLY
1055 int action; /* type of change */
1056 VARARG(name,string); /* name of directory entry that changed */
1057 @END
1060 /* Create a file mapping */
1061 @REQ(create_mapping)
1062 unsigned int access; /* wanted access rights */
1063 unsigned int attributes; /* object attributes */
1064 obj_handle_t rootdir; /* root directory */
1065 int size_high; /* mapping size */
1066 int size_low; /* mapping size */
1067 int protect; /* protection flags (see below) */
1068 obj_handle_t file_handle; /* file handle */
1069 VARARG(name,unicode_str); /* object name */
1070 @REPLY
1071 obj_handle_t handle; /* handle to the mapping */
1072 @END
1073 /* protection flags */
1074 #define VPROT_READ 0x01
1075 #define VPROT_WRITE 0x02
1076 #define VPROT_EXEC 0x04
1077 #define VPROT_WRITECOPY 0x08
1078 #define VPROT_GUARD 0x10
1079 #define VPROT_NOCACHE 0x20
1080 #define VPROT_COMMITTED 0x40
1081 #define VPROT_IMAGE 0x80
1084 /* Open a mapping */
1085 @REQ(open_mapping)
1086 unsigned int access; /* wanted access rights */
1087 unsigned int attributes; /* object attributes */
1088 obj_handle_t rootdir; /* root directory */
1089 VARARG(name,unicode_str); /* object name */
1090 @REPLY
1091 obj_handle_t handle; /* handle to the mapping */
1092 @END
1095 /* Get information about a file mapping */
1096 @REQ(get_mapping_info)
1097 obj_handle_t handle; /* handle to the mapping */
1098 @REPLY
1099 int size_high; /* mapping size */
1100 int size_low; /* mapping size */
1101 int protect; /* protection flags */
1102 int header_size; /* header size (for VPROT_IMAGE mapping) */
1103 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1104 obj_handle_t shared_file; /* shared mapping file handle */
1105 int shared_size; /* shared mapping size */
1106 @END
1109 #define SNAP_HEAPLIST 0x00000001
1110 #define SNAP_PROCESS 0x00000002
1111 #define SNAP_THREAD 0x00000004
1112 #define SNAP_MODULE 0x00000008
1113 /* Create a snapshot */
1114 @REQ(create_snapshot)
1115 unsigned int attributes; /* object attributes */
1116 int flags; /* snapshot flags (SNAP_*) */
1117 process_id_t pid; /* process id */
1118 @REPLY
1119 obj_handle_t handle; /* handle to the snapshot */
1120 @END
1123 /* Get the next process from a snapshot */
1124 @REQ(next_process)
1125 obj_handle_t handle; /* handle to the snapshot */
1126 int reset; /* reset snapshot position? */
1127 @REPLY
1128 int count; /* process usage count */
1129 process_id_t pid; /* process id */
1130 process_id_t ppid; /* parent process id */
1131 void* heap; /* heap base */
1132 void* module; /* main module */
1133 int threads; /* number of threads */
1134 int priority; /* process priority */
1135 int handles; /* number of handles */
1136 VARARG(filename,unicode_str); /* file name of main exe */
1137 @END
1140 /* Get the next thread from a snapshot */
1141 @REQ(next_thread)
1142 obj_handle_t handle; /* handle to the snapshot */
1143 int reset; /* reset snapshot position? */
1144 @REPLY
1145 int count; /* thread usage count */
1146 process_id_t pid; /* process id */
1147 thread_id_t tid; /* thread id */
1148 int base_pri; /* base priority */
1149 int delta_pri; /* delta priority */
1150 @END
1153 /* Get the next module from a snapshot */
1154 @REQ(next_module)
1155 obj_handle_t handle; /* handle to the snapshot */
1156 int reset; /* reset snapshot position? */
1157 @REPLY
1158 process_id_t pid; /* process id */
1159 void* base; /* module base address */
1160 size_t size; /* module size */
1161 VARARG(filename,unicode_str); /* file name of module */
1162 @END
1165 /* Wait for a debug event */
1166 @REQ(wait_debug_event)
1167 int get_handle; /* should we alloc a handle for waiting? */
1168 @REPLY
1169 process_id_t pid; /* process id */
1170 thread_id_t tid; /* thread id */
1171 obj_handle_t wait; /* wait handle if no event ready */
1172 VARARG(event,debug_event); /* debug event data */
1173 @END
1176 /* Queue an exception event */
1177 @REQ(queue_exception_event)
1178 int first; /* first chance exception? */
1179 VARARG(record,exc_event); /* thread context followed by exception record */
1180 @REPLY
1181 obj_handle_t handle; /* handle to the queued event */
1182 @END
1185 /* Retrieve the status of an exception event */
1186 @REQ(get_exception_status)
1187 obj_handle_t handle; /* handle to the queued event */
1188 @REPLY
1189 VARARG(context,context); /* modified thread context */
1190 @END
1193 /* Send an output string to the debugger */
1194 @REQ(output_debug_string)
1195 void* string; /* string to display (in debugged process address space) */
1196 int unicode; /* is it Unicode? */
1197 int length; /* string length */
1198 @END
1201 /* Continue a debug event */
1202 @REQ(continue_debug_event)
1203 process_id_t pid; /* process id to continue */
1204 thread_id_t tid; /* thread id to continue */
1205 int status; /* continuation status */
1206 @END
1209 /* Start/stop debugging an existing process */
1210 @REQ(debug_process)
1211 process_id_t pid; /* id of the process to debug */
1212 int attach; /* 1=attaching / 0=detaching from the process */
1213 @END
1216 /* Simulate a breakpoint in a process */
1217 @REQ(debug_break)
1218 obj_handle_t handle; /* process handle */
1219 @REPLY
1220 int self; /* was it the caller itself? */
1221 @END
1224 /* Set debugger kill on exit flag */
1225 @REQ(set_debugger_kill_on_exit)
1226 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1227 @END
1230 /* Read data from a process address space */
1231 @REQ(read_process_memory)
1232 obj_handle_t handle; /* process handle */
1233 void* addr; /* addr to read from */
1234 @REPLY
1235 VARARG(data,bytes); /* result data */
1236 @END
1239 /* Write data to a process address space */
1240 @REQ(write_process_memory)
1241 obj_handle_t handle; /* process handle */
1242 void* addr; /* addr to write to (must be int-aligned) */
1243 unsigned int first_mask; /* mask for first word */
1244 unsigned int last_mask; /* mask for last word */
1245 VARARG(data,bytes); /* data to write */
1246 @END
1249 /* Create a registry key */
1250 @REQ(create_key)
1251 obj_handle_t parent; /* handle to the parent key */
1252 unsigned int access; /* desired access rights */
1253 unsigned int attributes; /* object attributes */
1254 unsigned int options; /* creation options */
1255 time_t modif; /* last modification time */
1256 size_t namelen; /* length of key name in bytes */
1257 VARARG(name,unicode_str,namelen); /* key name */
1258 VARARG(class,unicode_str); /* class name */
1259 @REPLY
1260 obj_handle_t hkey; /* handle to the created key */
1261 int created; /* has it been newly created? */
1262 @END
1264 /* Open a registry key */
1265 @REQ(open_key)
1266 obj_handle_t parent; /* handle to the parent key */
1267 unsigned int access; /* desired access rights */
1268 unsigned int attributes; /* object attributes */
1269 VARARG(name,unicode_str); /* key name */
1270 @REPLY
1271 obj_handle_t hkey; /* handle to the open key */
1272 @END
1275 /* Delete a registry key */
1276 @REQ(delete_key)
1277 obj_handle_t hkey; /* handle to the key */
1278 @END
1281 /* Flush a registry key */
1282 @REQ(flush_key)
1283 obj_handle_t hkey; /* handle to the key */
1284 @END
1287 /* Enumerate registry subkeys */
1288 @REQ(enum_key)
1289 obj_handle_t hkey; /* handle to registry key */
1290 int index; /* index of subkey (or -1 for current key) */
1291 int info_class; /* requested information class */
1292 @REPLY
1293 int subkeys; /* number of subkeys */
1294 int max_subkey; /* longest subkey name */
1295 int max_class; /* longest class name */
1296 int values; /* number of values */
1297 int max_value; /* longest value name */
1298 int max_data; /* longest value data */
1299 time_t modif; /* last modification time */
1300 size_t total; /* total length needed for full name and class */
1301 size_t namelen; /* length of key name in bytes */
1302 VARARG(name,unicode_str,namelen); /* key name */
1303 VARARG(class,unicode_str); /* class name */
1304 @END
1307 /* Set a value of a registry key */
1308 @REQ(set_key_value)
1309 obj_handle_t hkey; /* handle to registry key */
1310 int type; /* value type */
1311 size_t namelen; /* length of value name in bytes */
1312 VARARG(name,unicode_str,namelen); /* value name */
1313 VARARG(data,bytes); /* value data */
1314 @END
1317 /* Retrieve the value of a registry key */
1318 @REQ(get_key_value)
1319 obj_handle_t hkey; /* handle to registry key */
1320 VARARG(name,unicode_str); /* value name */
1321 @REPLY
1322 int type; /* value type */
1323 size_t total; /* total length needed for data */
1324 VARARG(data,bytes); /* value data */
1325 @END
1328 /* Enumerate a value of a registry key */
1329 @REQ(enum_key_value)
1330 obj_handle_t hkey; /* handle to registry key */
1331 int index; /* value index */
1332 int info_class; /* requested information class */
1333 @REPLY
1334 int type; /* value type */
1335 size_t total; /* total length needed for full name and data */
1336 size_t namelen; /* length of value name in bytes */
1337 VARARG(name,unicode_str,namelen); /* value name */
1338 VARARG(data,bytes); /* value data */
1339 @END
1342 /* Delete a value of a registry key */
1343 @REQ(delete_key_value)
1344 obj_handle_t hkey; /* handle to registry key */
1345 VARARG(name,unicode_str); /* value name */
1346 @END
1349 /* Load a registry branch from a file */
1350 @REQ(load_registry)
1351 obj_handle_t hkey; /* root key to load to */
1352 obj_handle_t file; /* file to load from */
1353 VARARG(name,unicode_str); /* subkey name */
1354 @END
1357 /* UnLoad a registry branch from a file */
1358 @REQ(unload_registry)
1359 obj_handle_t hkey; /* root key to unload to */
1360 @END
1363 /* Save a registry branch to a file */
1364 @REQ(save_registry)
1365 obj_handle_t hkey; /* key to save */
1366 obj_handle_t file; /* file to save to */
1367 @END
1370 /* Add a registry key change notification */
1371 @REQ(set_registry_notification)
1372 obj_handle_t hkey; /* key to watch for changes */
1373 obj_handle_t event; /* event to set */
1374 int subtree; /* should we watch the whole subtree? */
1375 unsigned int filter; /* things to watch */
1376 @END
1379 /* Create a waitable timer */
1380 @REQ(create_timer)
1381 unsigned int access; /* wanted access rights */
1382 unsigned int attributes; /* object attributes */
1383 obj_handle_t rootdir; /* root directory */
1384 int manual; /* manual reset */
1385 VARARG(name,unicode_str); /* object name */
1386 @REPLY
1387 obj_handle_t handle; /* handle to the timer */
1388 @END
1391 /* Open a waitable timer */
1392 @REQ(open_timer)
1393 unsigned int access; /* wanted access rights */
1394 unsigned int attributes; /* object attributes */
1395 obj_handle_t rootdir; /* root directory */
1396 VARARG(name,unicode_str); /* object name */
1397 @REPLY
1398 obj_handle_t handle; /* handle to the timer */
1399 @END
1401 /* Set a waitable timer */
1402 @REQ(set_timer)
1403 obj_handle_t handle; /* handle to the timer */
1404 abs_time_t expire; /* next expiration absolute time */
1405 int period; /* timer period in ms */
1406 void* callback; /* callback function */
1407 void* arg; /* callback argument */
1408 @REPLY
1409 int signaled; /* was the timer signaled before this call ? */
1410 @END
1412 /* Cancel a waitable timer */
1413 @REQ(cancel_timer)
1414 obj_handle_t handle; /* handle to the timer */
1415 @REPLY
1416 int signaled; /* was the timer signaled before this calltime ? */
1417 @END
1419 /* Get information on a waitable timer */
1420 @REQ(get_timer_info)
1421 obj_handle_t handle; /* handle to the timer */
1422 @REPLY
1423 abs_time_t when; /* absolute time when the timer next expires */
1424 int signaled; /* is the timer signaled? */
1425 @END
1428 /* Retrieve the current context of a thread */
1429 @REQ(get_thread_context)
1430 obj_handle_t handle; /* thread handle */
1431 unsigned int flags; /* context flags */
1432 int suspend; /* if getting context during suspend */
1433 @REPLY
1434 int self; /* was it a handle to the current thread? */
1435 VARARG(context,context); /* thread context */
1436 @END
1439 /* Set the current context of a thread */
1440 @REQ(set_thread_context)
1441 obj_handle_t handle; /* thread handle */
1442 unsigned int flags; /* context flags */
1443 int suspend; /* if setting context during suspend */
1444 VARARG(context,context); /* thread context */
1445 @REPLY
1446 int self; /* was it a handle to the current thread? */
1447 @END
1450 /* Fetch a selector entry for a thread */
1451 @REQ(get_selector_entry)
1452 obj_handle_t handle; /* thread handle */
1453 int entry; /* LDT entry */
1454 @REPLY
1455 unsigned int base; /* selector base */
1456 unsigned int limit; /* selector limit */
1457 unsigned char flags; /* selector flags */
1458 @END
1461 /* Add an atom */
1462 @REQ(add_atom)
1463 obj_handle_t table; /* which table to add atom to */
1464 VARARG(name,unicode_str); /* atom name */
1465 @REPLY
1466 atom_t atom; /* resulting atom */
1467 @END
1470 /* Delete an atom */
1471 @REQ(delete_atom)
1472 obj_handle_t table; /* which table to delete atom from */
1473 atom_t atom; /* atom handle */
1474 @END
1477 /* Find an atom */
1478 @REQ(find_atom)
1479 obj_handle_t table; /* which table to find atom from */
1480 VARARG(name,unicode_str); /* atom name */
1481 @REPLY
1482 atom_t atom; /* atom handle */
1483 @END
1486 /* Get information about an atom */
1487 @REQ(get_atom_information)
1488 obj_handle_t table; /* which table to find atom from */
1489 atom_t atom; /* atom handle */
1490 @REPLY
1491 int count; /* atom lock count */
1492 int pinned; /* whether the atom has been pinned */
1493 size_t total; /* actual length of atom name */
1494 VARARG(name,unicode_str); /* atom name */
1495 @END
1498 /* Set information about an atom */
1499 @REQ(set_atom_information)
1500 obj_handle_t table; /* which table to find atom from */
1501 atom_t atom; /* atom handle */
1502 int pinned; /* whether to bump atom information */
1503 @END
1506 /* Empty an atom table */
1507 @REQ(empty_atom_table)
1508 obj_handle_t table; /* which table to find atom from */
1509 int if_pinned; /* whether to delete pinned atoms */
1510 @END
1513 /* Init an atom table */
1514 @REQ(init_atom_table)
1515 int entries; /* number of entries (only for local) */
1516 @REPLY
1517 obj_handle_t table; /* handle to the atom table */
1518 @END
1521 /* Get the message queue of the current thread */
1522 @REQ(get_msg_queue)
1523 @REPLY
1524 obj_handle_t handle; /* handle to the queue */
1525 @END
1528 /* Set the current message queue wakeup mask */
1529 @REQ(set_queue_mask)
1530 unsigned int wake_mask; /* wakeup bits mask */
1531 unsigned int changed_mask; /* changed bits mask */
1532 int skip_wait; /* will we skip waiting if signaled? */
1533 @REPLY
1534 unsigned int wake_bits; /* current wake bits */
1535 unsigned int changed_bits; /* current changed bits */
1536 @END
1539 /* Get the current message queue status */
1540 @REQ(get_queue_status)
1541 int clear; /* should we clear the change bits? */
1542 @REPLY
1543 unsigned int wake_bits; /* wake bits */
1544 unsigned int changed_bits; /* changed bits since last time */
1545 @END
1548 /* Wait for a process to start waiting on input */
1549 @REQ(wait_input_idle)
1550 obj_handle_t handle; /* process handle */
1551 int timeout; /* timeout */
1552 @REPLY
1553 obj_handle_t event; /* handle to idle event */
1554 @END
1557 /* Send a message to a thread queue */
1558 @REQ(send_message)
1559 thread_id_t id; /* thread id */
1560 int type; /* message type (see below) */
1561 int flags; /* message flags (see below) */
1562 user_handle_t win; /* window handle */
1563 unsigned int msg; /* message code */
1564 unsigned int wparam; /* parameters */
1565 unsigned int lparam; /* parameters */
1566 int x; /* x position */
1567 int y; /* y position */
1568 unsigned int time; /* message time */
1569 unsigned int info; /* extra info */
1570 int timeout; /* timeout for reply */
1571 void* callback; /* callback address */
1572 VARARG(data,bytes); /* message data for sent messages */
1573 @END
1575 @REQ(post_quit_message)
1576 int exit_code; /* exit code to return */
1577 @END
1579 enum message_type
1581 MSG_ASCII, /* Ascii message (from SendMessageA) */
1582 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1583 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1584 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1585 MSG_CALLBACK_RESULT,/* result of a callback message */
1586 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1587 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1588 MSG_HARDWARE, /* hardware message */
1589 MSG_WINEVENT /* winevent message */
1591 #define SEND_MSG_ABORT_IF_HUNG 0x01
1594 /* Get a message from the current queue */
1595 @REQ(get_message)
1596 int flags; /* see below */
1597 user_handle_t get_win; /* window handle to get */
1598 unsigned int get_first; /* first message code to get */
1599 unsigned int get_last; /* last message code to get */
1600 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1601 @REPLY
1602 int type; /* message type */
1603 user_handle_t win; /* window handle */
1604 unsigned int msg; /* message code */
1605 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1606 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1607 int x; /* x position */
1608 int y; /* y position */
1609 user_handle_t hook; /* winevent hook handle */
1610 void* hook_proc; /* winevent hook proc address */
1611 unsigned int time; /* message time */
1612 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1613 unsigned int hw_id; /* id if hardware message */
1614 unsigned int active_hooks; /* active hooks bitmap */
1615 size_t total; /* total size of extra data */
1616 VARARG(data,bytes); /* message data for sent messages */
1617 @END
1618 #define GET_MSG_REMOVE 1 /* remove the message */
1619 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1621 /* Reply to a sent message */
1622 @REQ(reply_message)
1623 unsigned int result; /* message result */
1624 int remove; /* should we remove the message? */
1625 VARARG(data,bytes); /* message data for sent messages */
1626 @END
1629 /* Accept the current hardware message */
1630 @REQ(accept_hardware_message)
1631 unsigned int hw_id; /* id of the hardware message */
1632 int remove; /* should we remove the message? */
1633 user_handle_t new_win; /* new destination window for current message */
1634 @END
1637 /* Retrieve the reply for the last message sent */
1638 @REQ(get_message_reply)
1639 int cancel; /* cancel message if not ready? */
1640 @REPLY
1641 unsigned int result; /* message result */
1642 VARARG(data,bytes); /* message data for sent messages */
1643 @END
1646 /* Set a window timer */
1647 @REQ(set_win_timer)
1648 user_handle_t win; /* window handle */
1649 unsigned int msg; /* message to post */
1650 unsigned int id; /* timer id */
1651 unsigned int rate; /* timer rate in ms */
1652 unsigned int lparam; /* message lparam (callback proc) */
1653 @REPLY
1654 unsigned int id; /* timer id */
1655 @END
1658 /* Kill a window timer */
1659 @REQ(kill_win_timer)
1660 user_handle_t win; /* window handle */
1661 unsigned int msg; /* message to post */
1662 unsigned int id; /* timer id */
1663 @END
1666 /* Retrieve info about a serial port */
1667 @REQ(get_serial_info)
1668 obj_handle_t handle; /* handle to comm port */
1669 @REPLY
1670 unsigned int readinterval;
1671 unsigned int readconst;
1672 unsigned int readmult;
1673 unsigned int writeconst;
1674 unsigned int writemult;
1675 unsigned int eventmask;
1676 @END
1679 /* Set info about a serial port */
1680 @REQ(set_serial_info)
1681 obj_handle_t handle; /* handle to comm port */
1682 int flags; /* bitmask to set values (see below) */
1683 unsigned int readinterval;
1684 unsigned int readconst;
1685 unsigned int readmult;
1686 unsigned int writeconst;
1687 unsigned int writemult;
1688 unsigned int eventmask;
1689 @END
1690 #define SERIALINFO_SET_TIMEOUTS 0x01
1691 #define SERIALINFO_SET_MASK 0x02
1694 /* Create an async I/O */
1695 @REQ(register_async)
1696 obj_handle_t handle; /* handle to comm port, socket or file */
1697 int type; /* type of queue to look after */
1698 void* io_apc; /* APC routine to queue upon end of async */
1699 void* io_sb; /* I/O status block (unique across all async on this handle) */
1700 void* io_user; /* data to pass back to caller */
1701 int count; /* count - usually # of bytes to be read/written */
1702 @END
1703 #define ASYNC_TYPE_READ 0x01
1704 #define ASYNC_TYPE_WRITE 0x02
1705 #define ASYNC_TYPE_WAIT 0x03
1708 /* Cancel all async op on a fd */
1709 @REQ(cancel_async)
1710 obj_handle_t handle; /* handle to comm port, socket or file */
1711 @END
1714 /* Create a named pipe */
1715 @REQ(create_named_pipe)
1716 unsigned int access;
1717 unsigned int attributes; /* object attributes */
1718 obj_handle_t rootdir; /* root directory */
1719 unsigned int options;
1720 unsigned int flags;
1721 unsigned int maxinstances;
1722 unsigned int outsize;
1723 unsigned int insize;
1724 unsigned int timeout;
1725 VARARG(name,unicode_str); /* pipe name */
1726 @REPLY
1727 obj_handle_t handle; /* handle to the pipe */
1728 @END
1730 /* flags in create_named_pipe and get_named_pipe_info */
1731 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1732 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1733 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1736 /* Open an existing named pipe */
1737 @REQ(open_named_pipe)
1738 unsigned int access;
1739 unsigned int attributes; /* object attributes */
1740 obj_handle_t rootdir; /* root directory */
1741 unsigned int flags; /* file flags */
1742 VARARG(name,unicode_str); /* pipe name */
1743 @REPLY
1744 obj_handle_t handle; /* handle to the pipe */
1745 @END
1748 /* Connect to a named pipe */
1749 @REQ(connect_named_pipe)
1750 obj_handle_t handle;
1751 obj_handle_t event;
1752 void* func;
1753 @END
1756 /* Wait for a named pipe */
1757 @REQ(wait_named_pipe)
1758 obj_handle_t handle;
1759 unsigned int timeout;
1760 obj_handle_t event;
1761 void* func;
1762 VARARG(name,unicode_str); /* pipe name */
1763 @END
1766 /* Disconnect a named pipe */
1767 @REQ(disconnect_named_pipe)
1768 obj_handle_t handle;
1769 @REPLY
1770 int fd; /* associated fd to close */
1771 @END
1774 @REQ(get_named_pipe_info)
1775 obj_handle_t handle;
1776 @REPLY
1777 unsigned int flags;
1778 unsigned int maxinstances;
1779 unsigned int outsize;
1780 unsigned int insize;
1781 @END
1784 /* Create a window */
1785 @REQ(create_window)
1786 user_handle_t parent; /* parent window */
1787 user_handle_t owner; /* owner window */
1788 atom_t atom; /* class atom */
1789 void* instance; /* module instance */
1790 @REPLY
1791 user_handle_t handle; /* created window */
1792 user_handle_t parent; /* full handle of parent */
1793 user_handle_t owner; /* full handle of owner */
1794 int extra; /* number of extra bytes */
1795 void* class_ptr; /* pointer to class in client address space */
1796 @END
1799 /* Destroy a window */
1800 @REQ(destroy_window)
1801 user_handle_t handle; /* handle to the window */
1802 @END
1805 /* Retrieve the desktop window for the current thread */
1806 @REQ(get_desktop_window)
1807 int force; /* force creation if it doesn't exist */
1808 @REPLY
1809 user_handle_t handle; /* handle to the desktop window */
1810 @END
1813 /* Set a window owner */
1814 @REQ(set_window_owner)
1815 user_handle_t handle; /* handle to the window */
1816 user_handle_t owner; /* new owner */
1817 @REPLY
1818 user_handle_t full_owner; /* full handle of new owner */
1819 user_handle_t prev_owner; /* full handle of previous owner */
1820 @END
1823 /* Get information from a window handle */
1824 @REQ(get_window_info)
1825 user_handle_t handle; /* handle to the window */
1826 @REPLY
1827 user_handle_t full_handle; /* full 32-bit handle */
1828 user_handle_t last_active; /* last active popup */
1829 process_id_t pid; /* process owning the window */
1830 thread_id_t tid; /* thread owning the window */
1831 atom_t atom; /* class atom */
1832 int is_unicode; /* ANSI or unicode */
1833 @END
1836 /* Set some information in a window */
1837 @REQ(set_window_info)
1838 user_handle_t handle; /* handle to the window */
1839 unsigned int flags; /* flags for fields to set (see below) */
1840 unsigned int style; /* window style */
1841 unsigned int ex_style; /* window extended style */
1842 unsigned int id; /* window id */
1843 void* instance; /* creator instance */
1844 int is_unicode; /* ANSI or unicode */
1845 void* user_data; /* user-specific data */
1846 int extra_offset; /* offset to set in extra bytes */
1847 size_t extra_size; /* size to set in extra bytes */
1848 unsigned int extra_value; /* value to set in extra bytes */
1849 @REPLY
1850 unsigned int old_style; /* old window style */
1851 unsigned int old_ex_style; /* old window extended style */
1852 unsigned int old_id; /* old window id */
1853 void* old_instance; /* old creator instance */
1854 void* old_user_data; /* old user-specific data */
1855 unsigned int old_extra_value; /* old value in extra bytes */
1856 @END
1857 #define SET_WIN_STYLE 0x01
1858 #define SET_WIN_EXSTYLE 0x02
1859 #define SET_WIN_ID 0x04
1860 #define SET_WIN_INSTANCE 0x08
1861 #define SET_WIN_USERDATA 0x10
1862 #define SET_WIN_EXTRA 0x20
1863 #define SET_WIN_UNICODE 0x40
1866 /* Set the parent of a window */
1867 @REQ(set_parent)
1868 user_handle_t handle; /* handle to the window */
1869 user_handle_t parent; /* handle to the parent */
1870 @REPLY
1871 user_handle_t old_parent; /* old parent window */
1872 user_handle_t full_parent; /* full handle of new parent */
1873 @END
1876 /* Get a list of the window parents, up to the root of the tree */
1877 @REQ(get_window_parents)
1878 user_handle_t handle; /* handle to the window */
1879 @REPLY
1880 int count; /* total count of parents */
1881 VARARG(parents,user_handles); /* parent handles */
1882 @END
1885 /* Get a list of the window children */
1886 @REQ(get_window_children)
1887 user_handle_t parent; /* parent window */
1888 atom_t atom; /* class atom for the listed children */
1889 thread_id_t tid; /* thread owning the listed children */
1890 @REPLY
1891 int count; /* total count of children */
1892 VARARG(children,user_handles); /* children handles */
1893 @END
1896 /* Get a list of the window children that contain a given point */
1897 @REQ(get_window_children_from_point)
1898 user_handle_t parent; /* parent window */
1899 int x; /* point in parent coordinates */
1900 int y;
1901 @REPLY
1902 int count; /* total count of children */
1903 VARARG(children,user_handles); /* children handles */
1904 @END
1907 /* Get window tree information from a window handle */
1908 @REQ(get_window_tree)
1909 user_handle_t handle; /* handle to the window */
1910 @REPLY
1911 user_handle_t parent; /* parent window */
1912 user_handle_t owner; /* owner window */
1913 user_handle_t next_sibling; /* next sibling in Z-order */
1914 user_handle_t prev_sibling; /* prev sibling in Z-order */
1915 user_handle_t first_sibling; /* first sibling in Z-order */
1916 user_handle_t last_sibling; /* last sibling in Z-order */
1917 user_handle_t first_child; /* first child */
1918 user_handle_t last_child; /* last child */
1919 @END
1921 /* Set the position and Z order of a window */
1922 @REQ(set_window_pos)
1923 user_handle_t handle; /* handle to the window */
1924 user_handle_t previous; /* previous window in Z order */
1925 unsigned int flags; /* SWP_* flags */
1926 rectangle_t window; /* window rectangle */
1927 rectangle_t client; /* client rectangle */
1928 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1929 @REPLY
1930 unsigned int new_style; /* new window style */
1931 @END
1934 /* Get the window and client rectangles of a window */
1935 @REQ(get_window_rectangles)
1936 user_handle_t handle; /* handle to the window */
1937 @REPLY
1938 rectangle_t window; /* window rectangle */
1939 rectangle_t visible; /* visible part of the window rectangle */
1940 rectangle_t client; /* client rectangle */
1941 @END
1944 /* Get the window text */
1945 @REQ(get_window_text)
1946 user_handle_t handle; /* handle to the window */
1947 @REPLY
1948 VARARG(text,unicode_str); /* window text */
1949 @END
1952 /* Set the window text */
1953 @REQ(set_window_text)
1954 user_handle_t handle; /* handle to the window */
1955 VARARG(text,unicode_str); /* window text */
1956 @END
1959 /* Get the coordinates offset between two windows */
1960 @REQ(get_windows_offset)
1961 user_handle_t from; /* handle to the first window */
1962 user_handle_t to; /* handle to the second window */
1963 @REPLY
1964 int x; /* x coordinate offset */
1965 int y; /* y coordinate offset */
1966 @END
1969 /* Get the visible region of a window */
1970 @REQ(get_visible_region)
1971 user_handle_t window; /* handle to the window */
1972 unsigned int flags; /* DCX flags */
1973 @REPLY
1974 user_handle_t top_win; /* top window to clip against */
1975 int top_org_x; /* top window visible rect origin in screen coords */
1976 int top_org_y;
1977 int win_org_x; /* window rect origin in screen coords */
1978 int win_org_y;
1979 size_t total_size; /* total size of the resulting region */
1980 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
1981 @END
1984 /* Get the window region */
1985 @REQ(get_window_region)
1986 user_handle_t window; /* handle to the window */
1987 @REPLY
1988 size_t total_size; /* total size of the resulting region */
1989 VARARG(region,rectangles); /* list of rectangles for the region */
1990 @END
1993 /* Set the window region */
1994 @REQ(set_window_region)
1995 user_handle_t window; /* handle to the window */
1996 VARARG(region,rectangles); /* list of rectangles for the region */
1997 @END
2000 /* Get the window update region */
2001 @REQ(get_update_region)
2002 user_handle_t window; /* handle to the window */
2003 user_handle_t from_child; /* child to start searching from */
2004 unsigned int flags; /* update flags (see below) */
2005 @REPLY
2006 user_handle_t child; /* child to repaint (or window itself) */
2007 unsigned int flags; /* resulting update flags (see below) */
2008 size_t total_size; /* total size of the resulting region */
2009 VARARG(region,rectangles); /* list of rectangles for the region */
2010 @END
2011 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2012 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2013 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2014 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2015 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2016 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2017 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2020 /* Update the z order of a window so that a given rectangle is fully visible */
2021 @REQ(update_window_zorder)
2022 user_handle_t window; /* handle to the window */
2023 rectangle_t rect; /* rectangle that must be visible */
2024 @END
2027 /* Mark parts of a window as needing a redraw */
2028 @REQ(redraw_window)
2029 user_handle_t window; /* handle to the window */
2030 unsigned int flags; /* RDW_* flags */
2031 VARARG(region,rectangles); /* list of rectangles for the region */
2032 @END
2035 /* Set a window property */
2036 @REQ(set_window_property)
2037 user_handle_t window; /* handle to the window */
2038 atom_t atom; /* property atom (if no name specified) */
2039 obj_handle_t handle; /* handle to store */
2040 VARARG(name,unicode_str); /* property name */
2041 @END
2044 /* Remove a window property */
2045 @REQ(remove_window_property)
2046 user_handle_t window; /* handle to the window */
2047 atom_t atom; /* property atom (if no name specified) */
2048 VARARG(name,unicode_str); /* property name */
2049 @REPLY
2050 obj_handle_t handle; /* handle stored in property */
2051 @END
2054 /* Get a window property */
2055 @REQ(get_window_property)
2056 user_handle_t window; /* handle to the window */
2057 atom_t atom; /* property atom (if no name specified) */
2058 VARARG(name,unicode_str); /* property name */
2059 @REPLY
2060 obj_handle_t handle; /* handle stored in property */
2061 @END
2064 /* Get the list of properties of a window */
2065 @REQ(get_window_properties)
2066 user_handle_t window; /* handle to the window */
2067 @REPLY
2068 int total; /* total number of properties */
2069 VARARG(props,properties); /* list of properties */
2070 @END
2073 /* Create a window station */
2074 @REQ(create_winstation)
2075 unsigned int flags; /* window station flags */
2076 unsigned int access; /* wanted access rights */
2077 unsigned int attributes; /* object attributes */
2078 VARARG(name,unicode_str); /* object name */
2079 @REPLY
2080 obj_handle_t handle; /* handle to the window station */
2081 @END
2084 /* Open a handle to a window station */
2085 @REQ(open_winstation)
2086 unsigned int access; /* wanted access rights */
2087 unsigned int attributes; /* object attributes */
2088 VARARG(name,unicode_str); /* object name */
2089 @REPLY
2090 obj_handle_t handle; /* handle to the window station */
2091 @END
2094 /* Close a window station */
2095 @REQ(close_winstation)
2096 obj_handle_t handle; /* handle to the window station */
2097 @END
2100 /* Get the process current window station */
2101 @REQ(get_process_winstation)
2102 @REPLY
2103 obj_handle_t handle; /* handle to the window station */
2104 @END
2107 /* Set the process current window station */
2108 @REQ(set_process_winstation)
2109 obj_handle_t handle; /* handle to the window station */
2110 @END
2113 /* Create a desktop */
2114 @REQ(create_desktop)
2115 unsigned int flags; /* desktop flags */
2116 unsigned int access; /* wanted access rights */
2117 unsigned int attributes; /* object attributes */
2118 VARARG(name,unicode_str); /* object name */
2119 @REPLY
2120 obj_handle_t handle; /* handle to the desktop */
2121 @END
2124 /* Open a handle to a desktop */
2125 @REQ(open_desktop)
2126 unsigned int flags; /* desktop flags */
2127 unsigned int access; /* wanted access rights */
2128 unsigned int attributes; /* object attributes */
2129 VARARG(name,unicode_str); /* object name */
2130 @REPLY
2131 obj_handle_t handle; /* handle to the desktop */
2132 @END
2135 /* Close a desktop */
2136 @REQ(close_desktop)
2137 obj_handle_t handle; /* handle to the desktop */
2138 @END
2141 /* Get the thread current desktop */
2142 @REQ(get_thread_desktop)
2143 thread_id_t tid; /* thread id */
2144 @REPLY
2145 obj_handle_t handle; /* handle to the desktop */
2146 @END
2149 /* Set the thread current desktop */
2150 @REQ(set_thread_desktop)
2151 obj_handle_t handle; /* handle to the desktop */
2152 @END
2155 /* Get/set information about a user object (window station or desktop) */
2156 @REQ(set_user_object_info)
2157 obj_handle_t handle; /* handle to the object */
2158 unsigned int flags; /* information to set */
2159 unsigned int obj_flags; /* new object flags */
2160 @REPLY
2161 int is_desktop; /* is object a desktop? */
2162 unsigned int old_obj_flags; /* old object flags */
2163 VARARG(name,unicode_str); /* object name */
2164 @END
2165 #define SET_USER_OBJECT_FLAGS 1
2168 /* Attach (or detach) thread inputs */
2169 @REQ(attach_thread_input)
2170 thread_id_t tid_from; /* thread to be attached */
2171 thread_id_t tid_to; /* thread to which tid_from should be attached */
2172 int attach; /* is it an attach? */
2173 @END
2176 /* Get input data for a given thread */
2177 @REQ(get_thread_input)
2178 thread_id_t tid; /* id of thread */
2179 @REPLY
2180 user_handle_t focus; /* handle to the focus window */
2181 user_handle_t capture; /* handle to the capture window */
2182 user_handle_t active; /* handle to the active window */
2183 user_handle_t foreground; /* handle to the global foreground window */
2184 user_handle_t menu_owner; /* handle to the menu owner */
2185 user_handle_t move_size; /* handle to the moving/resizing window */
2186 user_handle_t caret; /* handle to the caret window */
2187 rectangle_t rect; /* caret rectangle */
2188 @END
2191 /* Get the time of the last input event */
2192 @REQ(get_last_input_time)
2193 @REPLY
2194 unsigned int time;
2195 @END
2198 /* Retrieve queue keyboard state for a given thread */
2199 @REQ(get_key_state)
2200 thread_id_t tid; /* id of thread */
2201 int key; /* optional key code or -1 */
2202 @REPLY
2203 unsigned char state; /* state of specified key */
2204 VARARG(keystate,bytes); /* state array for all the keys */
2205 @END
2207 /* Set queue keyboard state for a given thread */
2208 @REQ(set_key_state)
2209 thread_id_t tid; /* id of thread */
2210 VARARG(keystate,bytes); /* state array for all the keys */
2211 @END
2213 /* Set the system foreground window */
2214 @REQ(set_foreground_window)
2215 user_handle_t handle; /* handle to the foreground window */
2216 @REPLY
2217 user_handle_t previous; /* handle to the previous foreground window */
2218 int send_msg_old; /* whether we have to send a msg to the old window */
2219 int send_msg_new; /* whether we have to send a msg to the new window */
2220 @END
2222 /* Set the current thread focus window */
2223 @REQ(set_focus_window)
2224 user_handle_t handle; /* handle to the focus window */
2225 @REPLY
2226 user_handle_t previous; /* handle to the previous focus window */
2227 @END
2229 /* Set the current thread active window */
2230 @REQ(set_active_window)
2231 user_handle_t handle; /* handle to the active window */
2232 @REPLY
2233 user_handle_t previous; /* handle to the previous active window */
2234 @END
2236 /* Set the current thread capture window */
2237 @REQ(set_capture_window)
2238 user_handle_t handle; /* handle to the capture window */
2239 unsigned int flags; /* capture flags (see below) */
2240 @REPLY
2241 user_handle_t previous; /* handle to the previous capture window */
2242 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2243 @END
2244 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2245 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2248 /* Set the current thread caret window */
2249 @REQ(set_caret_window)
2250 user_handle_t handle; /* handle to the caret window */
2251 int width; /* caret width */
2252 int height; /* caret height */
2253 @REPLY
2254 user_handle_t previous; /* handle to the previous caret window */
2255 rectangle_t old_rect; /* previous caret rectangle */
2256 int old_hide; /* previous hide count */
2257 int old_state; /* previous caret state (1=on, 0=off) */
2258 @END
2261 /* Set the current thread caret information */
2262 @REQ(set_caret_info)
2263 unsigned int flags; /* caret flags (see below) */
2264 user_handle_t handle; /* handle to the caret window */
2265 int x; /* caret x position */
2266 int y; /* caret y position */
2267 int hide; /* increment for hide count (can be negative to show it) */
2268 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2269 @REPLY
2270 user_handle_t full_handle; /* handle to the current caret window */
2271 rectangle_t old_rect; /* previous caret rectangle */
2272 int old_hide; /* previous hide count */
2273 int old_state; /* previous caret state (1=on, 0=off) */
2274 @END
2275 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2276 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2277 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2280 /* Set a window hook */
2281 @REQ(set_hook)
2282 int id; /* id of the hook */
2283 process_id_t pid; /* id of process to set the hook into */
2284 thread_id_t tid; /* id of thread to set the hook into */
2285 int event_min;
2286 int event_max;
2287 int flags;
2288 void* proc; /* hook procedure */
2289 int unicode; /* is it a unicode hook? */
2290 VARARG(module,unicode_str); /* module name */
2291 @REPLY
2292 user_handle_t handle; /* handle to the hook */
2293 unsigned int active_hooks; /* active hooks bitmap */
2294 @END
2297 /* Remove a window hook */
2298 @REQ(remove_hook)
2299 user_handle_t handle; /* handle to the hook */
2300 int id; /* id of the hook if handle is 0 */
2301 void* proc; /* hook procedure if handle is 0 */
2302 @REPLY
2303 unsigned int active_hooks; /* active hooks bitmap */
2304 @END
2307 /* Start calling a hook chain */
2308 @REQ(start_hook_chain)
2309 int id; /* id of the hook */
2310 int event; /* signalled event */
2311 user_handle_t window; /* handle to the event window */
2312 int object_id; /* object id for out of context winevent */
2313 int child_id; /* child id for out of context winevent */
2314 @REPLY
2315 user_handle_t handle; /* handle to the next hook */
2316 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2317 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2318 void* proc; /* hook procedure */
2319 int unicode; /* is it a unicode hook? */
2320 unsigned int active_hooks; /* active hooks bitmap */
2321 VARARG(module,unicode_str); /* module name */
2322 @END
2325 /* Finished calling a hook chain */
2326 @REQ(finish_hook_chain)
2327 int id; /* id of the hook */
2328 @END
2331 /* Get the next hook to call */
2332 @REQ(get_next_hook)
2333 user_handle_t handle; /* handle to the current hook */
2334 int event; /* signalled event */
2335 user_handle_t window; /* handle to the event window */
2336 int object_id; /* object id for out of context winevent */
2337 int child_id; /* child id for out of context winevent */
2338 @REPLY
2339 user_handle_t next; /* handle to the next hook */
2340 int id; /* id of the next hook */
2341 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2342 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2343 void* proc; /* next hook procedure */
2344 int prev_unicode; /* was the previous a unicode hook? */
2345 int next_unicode; /* is the next a unicode hook? */
2346 VARARG(module,unicode_str); /* module name */
2347 @END
2350 /* Create a window class */
2351 @REQ(create_class)
2352 int local; /* is it a local class? */
2353 atom_t atom; /* class atom */
2354 unsigned int style; /* class style */
2355 void* instance; /* module instance */
2356 int extra; /* number of extra class bytes */
2357 int win_extra; /* number of window extra bytes */
2358 void* client_ptr; /* pointer to class in client address space */
2359 @END
2362 /* Destroy a window class */
2363 @REQ(destroy_class)
2364 atom_t atom; /* class atom */
2365 void* instance; /* module instance */
2366 @REPLY
2367 void* client_ptr; /* pointer to class in client address space */
2368 @END
2371 /* Set some information in a class */
2372 @REQ(set_class_info)
2373 user_handle_t window; /* handle to the window */
2374 unsigned int flags; /* flags for info to set (see below) */
2375 atom_t atom; /* class atom */
2376 unsigned int style; /* class style */
2377 int win_extra; /* number of window extra bytes */
2378 void* instance; /* module instance */
2379 int extra_offset; /* offset to set in extra bytes */
2380 size_t extra_size; /* size to set in extra bytes */
2381 unsigned int extra_value; /* value to set in extra bytes */
2382 @REPLY
2383 atom_t old_atom; /* previous class atom */
2384 unsigned int old_style; /* previous class style */
2385 int old_extra; /* previous number of class extra bytes */
2386 int old_win_extra; /* previous number of window extra bytes */
2387 void* old_instance; /* previous module instance */
2388 unsigned int old_extra_value; /* old value in extra bytes */
2389 @END
2390 #define SET_CLASS_ATOM 0x0001
2391 #define SET_CLASS_STYLE 0x0002
2392 #define SET_CLASS_WINEXTRA 0x0004
2393 #define SET_CLASS_INSTANCE 0x0008
2394 #define SET_CLASS_EXTRA 0x0010
2397 /* Set/get clipboard information */
2398 @REQ(set_clipboard_info)
2399 unsigned int flags; /* flags for fields to set (see below) */
2400 user_handle_t clipboard; /* clipboard window */
2401 user_handle_t owner; /* clipboard owner */
2402 user_handle_t viewer; /* first clipboard viewer */
2403 unsigned int seqno; /* change sequence number */
2404 @REPLY
2405 unsigned int flags; /* status flags (see below) */
2406 user_handle_t old_clipboard; /* old clipboard window */
2407 user_handle_t old_owner; /* old clipboard owner */
2408 user_handle_t old_viewer; /* old clipboard viewer */
2409 unsigned int seqno; /* current sequence number */
2410 @END
2412 #define SET_CB_OPEN 0x001
2413 #define SET_CB_OWNER 0x002
2414 #define SET_CB_VIEWER 0x004
2415 #define SET_CB_SEQNO 0x008
2416 #define SET_CB_RELOWNER 0x010
2417 #define SET_CB_CLOSE 0x020
2418 #define CB_OPEN 0x040
2419 #define CB_OWNER 0x080
2420 #define CB_PROCESS 0x100
2423 /* Open a security token */
2424 @REQ(open_token)
2425 obj_handle_t handle; /* handle to the thread or process */
2426 unsigned int access; /* access rights to the new token */
2427 unsigned int attributes;/* object attributes */
2428 unsigned int flags; /* flags (see below) */
2429 @REPLY
2430 obj_handle_t token; /* handle to the token */
2431 @END
2432 #define OPEN_TOKEN_THREAD 1
2433 #define OPEN_TOKEN_AS_SELF 2
2436 /* Set/get the global windows */
2437 @REQ(set_global_windows)
2438 unsigned int flags; /* flags for fields to set (see below) */
2439 user_handle_t shell_window; /* handle to the new shell window */
2440 user_handle_t shell_listview; /* handle to the new shell listview window */
2441 user_handle_t progman_window; /* handle to the new program manager window */
2442 user_handle_t taskman_window; /* handle to the new task manager window */
2443 @REPLY
2444 user_handle_t old_shell_window; /* handle to the shell window */
2445 user_handle_t old_shell_listview; /* handle to the shell listview window */
2446 user_handle_t old_progman_window; /* handle to the new program manager window */
2447 user_handle_t old_taskman_window; /* handle to the new task manager window */
2448 @END
2449 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2450 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2451 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2453 /* Adjust the privileges held by a token */
2454 @REQ(adjust_token_privileges)
2455 obj_handle_t handle; /* handle to the token */
2456 int disable_all; /* disable all privileges? */
2457 int get_modified_state; /* get modified privileges? */
2458 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2459 @REPLY
2460 unsigned int len; /* total length in bytes required to store token privileges */
2461 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2462 @END
2464 /* Retrieves the set of privileges held by or available to a token */
2465 @REQ(get_token_privileges)
2466 obj_handle_t handle; /* handle to the token */
2467 @REPLY
2468 unsigned int len; /* total length in bytes required to store token privileges */
2469 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2470 @END
2472 /* Check the token has the required privileges */
2473 @REQ(check_token_privileges)
2474 obj_handle_t handle; /* handle to the token */
2475 int all_required; /* are all the privileges required for the check to succeed? */
2476 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2477 @REPLY
2478 int has_privileges; /* does the token have the required privileges? */
2479 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2480 @END
2482 @REQ(duplicate_token)
2483 obj_handle_t handle; /* handle to the token to duplicate */
2484 unsigned int access; /* access rights to the new token */
2485 unsigned int attributes; /* object attributes */
2486 int primary; /* is the new token to be a primary one? */
2487 int impersonation_level; /* impersonation level of the new token */
2488 @REPLY
2489 obj_handle_t new_handle; /* duplicated handle */
2490 @END
2492 @REQ(access_check)
2493 obj_handle_t handle; /* handle to the token */
2494 unsigned int desired_access; /* desired access to the object */
2495 unsigned int mapping_read; /* mapping from generic read to specific rights */
2496 unsigned int mapping_write; /* mapping from generic write to specific rights */
2497 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2498 unsigned int mapping_all; /* mapping from generic all to specific rights */
2499 VARARG(sd,security_descriptor); /* security descriptor to check */
2500 @REPLY
2501 unsigned int access_granted; /* access rights actually granted */
2502 unsigned int access_status; /* was access granted? */
2503 unsigned int privileges_len; /* length needed to store privileges */
2504 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2505 @END
2507 @REQ(get_token_user)
2508 obj_handle_t handle; /* handle to the token */
2509 @REPLY
2510 size_t user_len; /* length needed to store user */
2511 VARARG(user,SID); /* sid of the user the token represents */
2512 @END
2514 /* Create a mailslot */
2515 @REQ(create_mailslot)
2516 unsigned int access; /* wanted access rights */
2517 unsigned int attributes; /* object attributes */
2518 obj_handle_t rootdir; /* root directory */
2519 unsigned int max_msgsize;
2520 int read_timeout;
2521 VARARG(name,unicode_str); /* mailslot name */
2522 @REPLY
2523 obj_handle_t handle; /* handle to the mailslot */
2524 @END
2527 /* Open an existing mailslot */
2528 @REQ(open_mailslot)
2529 unsigned int access;
2530 unsigned int attributes; /* object attributes */
2531 obj_handle_t rootdir; /* root directory */
2532 unsigned int sharing; /* sharing mode */
2533 VARARG(name,unicode_str); /* mailslot name */
2534 @REPLY
2535 obj_handle_t handle; /* handle to the mailslot */
2536 @END
2539 /* Set mailslot information */
2540 @REQ(set_mailslot_info)
2541 obj_handle_t handle; /* handle to the mailslot */
2542 unsigned int flags;
2543 int read_timeout;
2544 @REPLY
2545 unsigned int max_msgsize;
2546 int read_timeout;
2547 unsigned int msg_count;
2548 unsigned int next_msgsize;
2549 @END
2550 #define MAILSLOT_SET_READ_TIMEOUT 1
2553 /* Create a directory object */
2554 @REQ(create_directory)
2555 unsigned int access; /* access flags */
2556 unsigned int attributes; /* object attributes */
2557 obj_handle_t rootdir; /* root directory */
2558 VARARG(directory_name,unicode_str); /* Directory name */
2559 @REPLY
2560 obj_handle_t handle; /* handle to the directory */
2561 @END
2564 /* Open a directory object */
2565 @REQ(open_directory)
2566 unsigned int access; /* access flags */
2567 unsigned int attributes; /* object attributes */
2568 obj_handle_t rootdir; /* root directory */
2569 VARARG(directory_name,unicode_str); /* Directory name */
2570 @REPLY
2571 obj_handle_t handle; /* handle to the directory */
2572 @END
2575 /* Create a symbolic link object */
2576 @REQ(create_symlink)
2577 unsigned int access; /* access flags */
2578 unsigned int attributes; /* object attributes */
2579 obj_handle_t rootdir; /* root directory */
2580 size_t name_len; /* length of the symlink name in bytes */
2581 VARARG(name,unicode_str,name_len); /* symlink name */
2582 VARARG(target_name,unicode_str); /* target name */
2583 @REPLY
2584 obj_handle_t handle; /* handle to the symlink */
2585 @END
2588 /* Open a symbolic link object */
2589 @REQ(open_symlink)
2590 unsigned int access; /* access flags */
2591 unsigned int attributes; /* object attributes */
2592 obj_handle_t rootdir; /* root directory */
2593 VARARG(name,unicode_str); /* symlink name */
2594 @REPLY
2595 obj_handle_t handle; /* handle to the symlink */
2596 @END
2599 /* Query a symbolic link object */
2600 @REQ(query_symlink)
2601 obj_handle_t handle; /* handle to the symlink */
2602 @REPLY
2603 VARARG(target_name,unicode_str); /* target name */
2604 @END