Move remaining GDI objects to the large heap.
[wine/wine64.git] / server / protocol.def
blobbbf2213ed3bb39ee33d9aaacff68967adbc8110e
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 struct request_header
36 int req; /* request code */
37 size_t request_size; /* request variable part size */
38 size_t reply_size; /* reply variable part maximum size */
41 struct reply_header
43 unsigned int error; /* error result */
44 size_t reply_size; /* reply variable part size */
47 /* placeholder structure for the maximum allowed request size */
48 /* this is used to construct the generic_request union */
49 struct request_max_size
51 int pad[16]; /* the max request size is 16 ints */
54 typedef void *obj_handle_t;
55 typedef void *user_handle_t;
56 typedef unsigned short atom_t;
57 typedef unsigned int process_id_t;
58 typedef unsigned int thread_id_t;
60 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
61 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
64 /* definitions of the event data depending on the event code */
65 struct debug_event_exception
67 EXCEPTION_RECORD record; /* exception record */
68 int first; /* first chance exception? */
70 struct debug_event_create_thread
72 obj_handle_t handle; /* handle to the new thread */
73 void *teb; /* thread teb (in debugged process address space) */
74 void *start; /* thread startup routine */
76 struct debug_event_create_process
78 obj_handle_t file; /* handle to the process exe file */
79 obj_handle_t process; /* handle to the new process */
80 obj_handle_t thread; /* handle to the new thread */
81 void *base; /* base of executable image */
82 int dbg_offset; /* offset of debug info in file */
83 int dbg_size; /* size of debug info */
84 void *teb; /* thread teb (in debugged process address space) */
85 void *start; /* thread startup routine */
86 void *name; /* image name (optional) */
87 int unicode; /* is it Unicode? */
89 struct debug_event_exit
91 int exit_code; /* thread or process exit code */
93 struct debug_event_load_dll
95 obj_handle_t handle; /* file handle for the dll */
96 void *base; /* base address of the dll */
97 int dbg_offset; /* offset of debug info in file */
98 int dbg_size; /* size of debug info */
99 void *name; /* image name (optional) */
100 int unicode; /* is it Unicode? */
102 struct debug_event_unload_dll
104 void *base; /* base address of the dll */
106 struct debug_event_output_string
108 void *string; /* string to display (in debugged process address space) */
109 int unicode; /* is it Unicode? */
110 int length; /* string length */
112 struct debug_event_rip_info
114 int error; /* ??? */
115 int type; /* ??? */
117 union debug_event_data
119 struct debug_event_exception exception;
120 struct debug_event_create_thread create_thread;
121 struct debug_event_create_process create_process;
122 struct debug_event_exit exit;
123 struct debug_event_load_dll load_dll;
124 struct debug_event_unload_dll unload_dll;
125 struct debug_event_output_string output_string;
126 struct debug_event_rip_info rip_info;
129 /* debug event data */
130 typedef struct
132 int code; /* event code */
133 union debug_event_data info; /* event information */
134 } debug_event_t;
136 /* structure used in sending an fd from client to server */
137 struct send_fd
139 thread_id_t tid; /* thread id */
140 int fd; /* file descriptor on client-side */
143 /* structure sent by the server on the wait fifo */
144 struct wake_up_reply
146 void *cookie; /* magic cookie that was passed in select_request */
147 int signaled; /* wait result */
150 /* structure for absolute timeouts */
151 typedef struct
153 int sec; /* seconds since Unix epoch */
154 int usec; /* microseconds */
155 } abs_time_t;
157 /* structure returned in the list of window properties */
158 typedef struct
160 atom_t atom; /* property atom */
161 short string; /* was atom a string originally? */
162 obj_handle_t handle; /* handle stored in property */
163 } property_data_t;
165 /* structure to specify window rectangles */
166 typedef struct
168 int left;
169 int top;
170 int right;
171 int bottom;
172 } rectangle_t;
174 /* structure for console char/attribute info */
175 typedef struct
177 WCHAR ch;
178 unsigned short attr;
179 } char_info_t;
181 #define MAX_ACL_LEN 65535
183 struct security_descriptor
185 unsigned int control; /* SE_ flags */
186 size_t owner_len;
187 size_t group_len;
188 size_t sacl_len;
189 size_t dacl_len;
190 /* VARARGS(owner,SID); */
191 /* VARARGS(group,SID); */
192 /* VARARGS(sacl,ACL); */
193 /* VARARGS(dacl,ACL); */
196 /****************************************************************/
197 /* Request declarations */
199 /* Create a new process from the context of the parent */
200 @REQ(new_process)
201 int inherit_all; /* inherit all handles from parent */
202 int create_flags; /* creation flags */
203 int unix_pid; /* Unix pid of new process */
204 obj_handle_t exe_file; /* file handle for main exe */
205 obj_handle_t hstdin; /* handle for stdin */
206 obj_handle_t hstdout; /* handle for stdout */
207 obj_handle_t hstderr; /* handle for stderr */
208 VARARG(info,startup_info); /* startup information */
209 VARARG(env,unicode_str); /* environment for new process */
210 @REPLY
211 obj_handle_t info; /* new process info handle */
212 @END
215 /* Retrieve information about a newly started process */
216 @REQ(get_new_process_info)
217 obj_handle_t info; /* info handle returned from new_process_request */
218 int pinherit; /* process handle inherit flag */
219 int tinherit; /* thread handle inherit flag */
220 @REPLY
221 process_id_t pid; /* process id */
222 obj_handle_t phandle; /* process handle (in the current process) */
223 thread_id_t tid; /* thread id */
224 obj_handle_t thandle; /* thread handle (in the current process) */
225 int success; /* did the process start successfully? */
226 @END
229 /* Create a new thread from the context of the parent */
230 @REQ(new_thread)
231 int suspend; /* new thread should be suspended on creation */
232 int inherit; /* inherit flag */
233 int request_fd; /* fd for request pipe */
234 @REPLY
235 thread_id_t tid; /* thread id */
236 obj_handle_t handle; /* thread handle (in the current process) */
237 @END
240 /* Signal that we are finished booting on the client side */
241 @REQ(boot_done)
242 int debug_level; /* new debug level */
243 @END
246 /* Initialize a process; called from the new process context */
247 @REQ(init_process)
248 void* peb; /* addr of PEB */
249 void* ldt_copy; /* addr of LDT copy */
250 @REPLY
251 int create_flags; /* creation flags */
252 unsigned int server_start; /* server start time (GetTickCount) */
253 size_t info_size; /* total size of startup info */
254 obj_handle_t exe_file; /* file handle for main exe */
255 obj_handle_t hstdin; /* handle for stdin */
256 obj_handle_t hstdout; /* handle for stdout */
257 obj_handle_t hstderr; /* handle for stderr */
258 @END
261 /* Retrieve the new process startup info */
262 @REQ(get_startup_info)
263 @REPLY
264 VARARG(info,startup_info); /* startup information */
265 VARARG(env,unicode_str); /* environment */
266 @END
269 /* Signal the end of the process initialization */
270 @REQ(init_process_done)
271 void* module; /* main module base address */
272 size_t module_size; /* main module size */
273 void* entry; /* process entry point */
274 void* name; /* ptr to ptr to name (in process addr space) */
275 obj_handle_t exe_file; /* file handle for main exe */
276 int gui; /* is it a GUI process? */
277 VARARG(filename,unicode_str); /* file name of main exe */
278 @END
281 /* Initialize a thread; called from the child after fork()/clone() */
282 @REQ(init_thread)
283 int unix_pid; /* Unix pid of new thread */
284 int unix_tid; /* Unix tid of new thread */
285 void* teb; /* TEB of new thread (in thread address space) */
286 void* entry; /* thread entry point (in thread address space) */
287 int reply_fd; /* fd for reply pipe */
288 int wait_fd; /* fd for blocking calls pipe */
289 @REPLY
290 process_id_t pid; /* process id of the new thread's process */
291 thread_id_t tid; /* thread id of the new thread */
292 int boot; /* is this the boot thread? */
293 int version; /* protocol version */
294 @END
297 /* Terminate a process */
298 @REQ(terminate_process)
299 obj_handle_t handle; /* process handle to terminate */
300 int exit_code; /* process exit code */
301 @REPLY
302 int self; /* suicide? */
303 @END
306 /* Terminate a thread */
307 @REQ(terminate_thread)
308 obj_handle_t handle; /* thread handle to terminate */
309 int exit_code; /* thread exit code */
310 @REPLY
311 int self; /* suicide? */
312 int last; /* last thread in this process? */
313 @END
316 /* Retrieve information about a process */
317 @REQ(get_process_info)
318 obj_handle_t handle; /* process handle */
319 @REPLY
320 process_id_t pid; /* server process id */
321 process_id_t ppid; /* server process id of parent */
322 int exit_code; /* process exit code */
323 int priority; /* priority class */
324 int process_affinity; /* process affinity mask */
325 int system_affinity; /* system affinity mask */
326 void* peb; /* PEB address in process address space */
327 @END
330 /* Set a process informations */
331 @REQ(set_process_info)
332 obj_handle_t handle; /* process handle */
333 int mask; /* setting mask (see below) */
334 int priority; /* priority class */
335 int affinity; /* affinity mask */
336 @END
337 #define SET_PROCESS_INFO_PRIORITY 0x01
338 #define SET_PROCESS_INFO_AFFINITY 0x02
341 /* Retrieve information about a thread */
342 @REQ(get_thread_info)
343 obj_handle_t handle; /* thread handle */
344 thread_id_t tid_in; /* thread id (optional) */
345 @REPLY
346 process_id_t pid; /* server process id */
347 thread_id_t tid; /* server thread id */
348 void* teb; /* thread teb pointer */
349 int exit_code; /* thread exit code */
350 int priority; /* thread priority level */
351 int affinity; /* thread affinity mask */
352 time_t creation_time; /* thread creation time */
353 time_t exit_time; /* thread exit time */
354 @END
357 /* Set a thread informations */
358 @REQ(set_thread_info)
359 obj_handle_t handle; /* thread handle */
360 int mask; /* setting mask (see below) */
361 int priority; /* priority class */
362 int affinity; /* affinity mask */
363 @END
364 #define SET_THREAD_INFO_PRIORITY 0x01
365 #define SET_THREAD_INFO_AFFINITY 0x02
368 /* Retrieve information about a module */
369 @REQ(get_dll_info)
370 obj_handle_t handle; /* process handle */
371 void* base_address; /* base address of module */
372 @REPLY
373 size_t size; /* module size */
374 void* entry_point;
375 VARARG(filename,unicode_str); /* file name of module */
376 @END
379 /* Suspend a thread */
380 @REQ(suspend_thread)
381 obj_handle_t handle; /* thread handle */
382 @REPLY
383 int count; /* new suspend count */
384 @END
387 /* Resume a thread */
388 @REQ(resume_thread)
389 obj_handle_t handle; /* thread handle */
390 @REPLY
391 int count; /* new suspend count */
392 @END
395 /* Notify the server that a dll has been loaded */
396 @REQ(load_dll)
397 obj_handle_t handle; /* file handle */
398 void* base; /* base address */
399 size_t size; /* dll size */
400 int dbg_offset; /* debug info offset */
401 int dbg_size; /* debug info size */
402 void* name; /* ptr to ptr to name (in process addr space) */
403 VARARG(filename,unicode_str); /* file name of dll */
404 @END
407 /* Notify the server that a dll is being unloaded */
408 @REQ(unload_dll)
409 void* base; /* base address */
410 @END
413 /* Queue an APC for a thread */
414 @REQ(queue_apc)
415 obj_handle_t handle; /* thread handle */
416 int user; /* user or system apc? */
417 void* func; /* function to call */
418 void* arg1; /* params for function to call */
419 void* arg2;
420 void* arg3;
421 @END
424 /* Get next APC to call */
425 @REQ(get_apc)
426 int alertable; /* is thread alertable? */
427 @REPLY
428 void* func; /* function to call */
429 int type; /* function type */
430 void* arg1; /* function arguments */
431 void* arg2;
432 void* arg3;
433 @END
434 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
437 /* Close a handle for the current process */
438 @REQ(close_handle)
439 obj_handle_t handle; /* handle to close */
440 @REPLY
441 int fd; /* associated fd to close */
442 @END
445 /* Set a handle information */
446 @REQ(set_handle_info)
447 obj_handle_t handle; /* handle we are interested in */
448 int flags; /* new handle flags */
449 int mask; /* mask for flags to set */
450 int fd; /* file descriptor or -1 */
451 @REPLY
452 int old_flags; /* old flag value */
453 int cur_fd; /* current file descriptor */
454 @END
457 /* Duplicate a handle */
458 @REQ(dup_handle)
459 obj_handle_t src_process; /* src process handle */
460 obj_handle_t src_handle; /* src handle to duplicate */
461 obj_handle_t dst_process; /* dst process handle */
462 unsigned int access; /* wanted access rights */
463 int inherit; /* inherit flag */
464 int options; /* duplicate options (see below) */
465 @REPLY
466 obj_handle_t handle; /* duplicated handle in dst process */
467 int fd; /* associated fd to close */
468 @END
469 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
470 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
471 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
474 /* Open a handle to a process */
475 @REQ(open_process)
476 process_id_t pid; /* process id to open */
477 unsigned int access; /* wanted access rights */
478 int inherit; /* inherit flag */
479 @REPLY
480 obj_handle_t handle; /* handle to the process */
481 @END
484 /* Open a handle to a thread */
485 @REQ(open_thread)
486 thread_id_t tid; /* thread id to open */
487 unsigned int access; /* wanted access rights */
488 int inherit; /* inherit flag */
489 @REPLY
490 obj_handle_t handle; /* handle to the thread */
491 @END
494 /* Wait for handles */
495 @REQ(select)
496 int flags; /* wait flags (see below) */
497 void* cookie; /* magic cookie to return to client */
498 obj_handle_t signal; /* object to signal (0 if none) */
499 abs_time_t timeout; /* absolute timeout */
500 VARARG(handles,handles); /* handles to select on */
501 @END
502 #define SELECT_ALL 1
503 #define SELECT_ALERTABLE 2
504 #define SELECT_INTERRUPTIBLE 4
505 #define SELECT_TIMEOUT 8
508 /* Create an event */
509 @REQ(create_event)
510 unsigned int access; /* wanted access rights */
511 int manual_reset; /* manual reset event */
512 int initial_state; /* initial state of the event */
513 int inherit; /* inherit flag */
514 VARARG(name,unicode_str); /* object name */
515 @REPLY
516 obj_handle_t handle; /* handle to the event */
517 @END
519 /* Event operation */
520 @REQ(event_op)
521 obj_handle_t handle; /* handle to event */
522 int op; /* event operation (see below) */
523 @END
524 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
527 /* Open an event */
528 @REQ(open_event)
529 unsigned int access; /* wanted access rights */
530 int inherit; /* inherit flag */
531 VARARG(name,unicode_str); /* object name */
532 @REPLY
533 obj_handle_t handle; /* handle to the event */
534 @END
537 /* Create a mutex */
538 @REQ(create_mutex)
539 unsigned int access; /* wanted access rights */
540 int owned; /* initially owned? */
541 int inherit; /* inherit flag */
542 VARARG(name,unicode_str); /* object name */
543 @REPLY
544 obj_handle_t handle; /* handle to the mutex */
545 @END
548 /* Release a mutex */
549 @REQ(release_mutex)
550 obj_handle_t handle; /* handle to the mutex */
551 @REPLY
552 unsigned int prev_count; /* value of internal counter, before release */
553 @END
556 /* Open a mutex */
557 @REQ(open_mutex)
558 unsigned int access; /* wanted access rights */
559 int inherit; /* inherit flag */
560 VARARG(name,unicode_str); /* object name */
561 @REPLY
562 obj_handle_t handle; /* handle to the mutex */
563 @END
566 /* Create a semaphore */
567 @REQ(create_semaphore)
568 unsigned int access; /* wanted access rights */
569 unsigned int initial; /* initial count */
570 unsigned int max; /* maximum count */
571 int inherit; /* inherit flag */
572 VARARG(name,unicode_str); /* object name */
573 @REPLY
574 obj_handle_t handle; /* handle to the semaphore */
575 @END
578 /* Release a semaphore */
579 @REQ(release_semaphore)
580 obj_handle_t handle; /* handle to the semaphore */
581 unsigned int count; /* count to add to semaphore */
582 @REPLY
583 unsigned int prev_count; /* previous semaphore count */
584 @END
587 /* Open a semaphore */
588 @REQ(open_semaphore)
589 unsigned int access; /* wanted access rights */
590 int inherit; /* inherit flag */
591 VARARG(name,unicode_str); /* object name */
592 @REPLY
593 obj_handle_t handle; /* handle to the semaphore */
594 @END
597 /* Create a file */
598 @REQ(create_file)
599 unsigned int access; /* wanted access rights */
600 int inherit; /* inherit flag */
601 unsigned int sharing; /* sharing flags */
602 int create; /* file create action */
603 unsigned int options; /* file options */
604 unsigned int attrs; /* file attributes for creation */
605 VARARG(filename,string); /* file name */
606 @REPLY
607 obj_handle_t handle; /* handle to the file */
608 @END
611 /* Allocate a file handle for a Unix fd */
612 @REQ(alloc_file_handle)
613 unsigned int access; /* wanted access rights */
614 int inherit; /* inherit flag */
615 int fd; /* file descriptor on the client side */
616 @REPLY
617 obj_handle_t handle; /* handle to the file */
618 @END
621 /* Get a Unix fd to access a file */
622 @REQ(get_handle_fd)
623 obj_handle_t handle; /* handle to the file */
624 unsigned int access; /* wanted access rights */
625 @REPLY
626 int fd; /* file descriptor */
627 int flags; /* file read/write flags (see below) */
628 @END
629 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
630 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
631 #define FD_FLAG_RECV_SHUTDOWN 0x04
632 #define FD_FLAG_SEND_SHUTDOWN 0x08
633 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
634 * only handle available data (don't wait) */
637 /* Flush a file buffers */
638 @REQ(flush_file)
639 obj_handle_t handle; /* handle to the file */
640 @REPLY
641 obj_handle_t event; /* event set when finished */
642 @END
645 /* Lock a region of a file */
646 @REQ(lock_file)
647 obj_handle_t handle; /* handle to the file */
648 unsigned int offset_low; /* offset of start of lock */
649 unsigned int offset_high; /* offset of start of lock */
650 unsigned int count_low; /* count of bytes to lock */
651 unsigned int count_high; /* count of bytes to lock */
652 int shared; /* shared or exclusive lock? */
653 int wait; /* do we want to wait? */
654 @REPLY
655 obj_handle_t handle; /* handle to wait on */
656 int overlapped; /* is it an overlapped I/O handle? */
657 @END
660 /* Unlock a region of a file */
661 @REQ(unlock_file)
662 obj_handle_t handle; /* handle to the file */
663 unsigned int offset_low; /* offset of start of unlock */
664 unsigned int offset_high; /* offset of start of unlock */
665 unsigned int count_low; /* count of bytes to unlock */
666 unsigned int count_high; /* count of bytes to unlock */
667 @END
670 /* Create a socket */
671 @REQ(create_socket)
672 unsigned int access; /* wanted access rights */
673 int inherit; /* inherit flag */
674 int family; /* family, see socket manpage */
675 int type; /* type, see socket manpage */
676 int protocol; /* protocol, see socket manpage */
677 unsigned int flags; /* socket flags */
678 @REPLY
679 obj_handle_t handle; /* handle to the new socket */
680 @END
683 /* Accept a socket */
684 @REQ(accept_socket)
685 obj_handle_t lhandle; /* handle to the listening socket */
686 unsigned int access; /* wanted access rights */
687 int inherit; /* inherit flag */
688 @REPLY
689 obj_handle_t handle; /* handle to the new socket */
690 @END
693 /* Set socket event parameters */
694 @REQ(set_socket_event)
695 obj_handle_t handle; /* handle to the socket */
696 unsigned int mask; /* event mask */
697 obj_handle_t event; /* event object */
698 user_handle_t window; /* window to send the message to */
699 unsigned int msg; /* message to send */
700 @END
703 /* Get socket event parameters */
704 @REQ(get_socket_event)
705 obj_handle_t handle; /* handle to the socket */
706 int service; /* clear pending? */
707 obj_handle_t c_event; /* event to clear */
708 @REPLY
709 unsigned int mask; /* event mask */
710 unsigned int pmask; /* pending events */
711 unsigned int state; /* status bits */
712 VARARG(errors,ints); /* event errors */
713 @END
716 /* Reenable pending socket events */
717 @REQ(enable_socket_event)
718 obj_handle_t handle; /* handle to the socket */
719 unsigned int mask; /* events to re-enable */
720 unsigned int sstate; /* status bits to set */
721 unsigned int cstate; /* status bits to clear */
722 @END
724 @REQ(set_socket_deferred)
725 obj_handle_t handle; /* handle to the socket */
726 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
727 @END
729 /* Allocate a console (only used by a console renderer) */
730 @REQ(alloc_console)
731 unsigned int access; /* wanted access rights */
732 int inherit; /* inherit flag */
733 process_id_t pid; /* pid of process which shall be attached to the console */
734 @REPLY
735 obj_handle_t handle_in; /* handle to console input */
736 obj_handle_t event; /* handle to renderer events change notification */
737 @END
740 /* Free the console of the current process */
741 @REQ(free_console)
742 @END
745 #define CONSOLE_RENDERER_NONE_EVENT 0x00
746 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
747 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
748 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
749 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
750 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
751 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
752 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
753 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
754 struct console_renderer_event
756 short event;
757 union
759 struct update
761 short top;
762 short bottom;
763 } update;
764 struct resize
766 short width;
767 short height;
768 } resize;
769 struct cursor_pos
771 short x;
772 short y;
773 } cursor_pos;
774 struct cursor_geom
776 short visible;
777 short size;
778 } cursor_geom;
779 struct display
781 short left;
782 short top;
783 short width;
784 short height;
785 } display;
786 } u;
789 /* retrieve console events for the renderer */
790 @REQ(get_console_renderer_events)
791 obj_handle_t handle; /* handle to console input events */
792 @REPLY
793 VARARG(data,bytes); /* the various console_renderer_events */
794 @END
797 /* Open a handle to the process console */
798 @REQ(open_console)
799 int from; /* 0 (resp 1) input (resp output) of current process console */
800 /* otherwise console_in handle to get active screen buffer? */
801 unsigned int access; /* wanted access rights */
802 int inherit; /* inherit flag */
803 int share; /* share mask (only for output handles) */
804 @REPLY
805 obj_handle_t handle; /* handle to the console */
806 @END
809 /* Get the input queue wait event */
810 @REQ(get_console_wait_event)
811 @REPLY
812 obj_handle_t handle;
813 @END
815 /* Get a console mode (input or output) */
816 @REQ(get_console_mode)
817 obj_handle_t handle; /* handle to the console */
818 @REPLY
819 int mode; /* console mode */
820 @END
823 /* Set a console mode (input or output) */
824 @REQ(set_console_mode)
825 obj_handle_t handle; /* handle to the console */
826 int mode; /* console mode */
827 @END
830 /* Set info about a console (input only) */
831 @REQ(set_console_input_info)
832 obj_handle_t handle; /* handle to console input, or 0 for process' console */
833 int mask; /* setting mask (see below) */
834 obj_handle_t active_sb; /* active screen buffer */
835 int history_mode; /* whether we duplicate lines in history */
836 int history_size; /* number of lines in history */
837 int edition_mode; /* index to the edition mode flavors */
838 VARARG(title,unicode_str); /* console title */
839 @END
840 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
841 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
842 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
843 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
844 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
847 /* Get info about a console (input only) */
848 @REQ(get_console_input_info)
849 obj_handle_t handle; /* handle to console input, or 0 for process' console */
850 @REPLY
851 int history_mode; /* whether we duplicate lines in history */
852 int history_size; /* number of lines in history */
853 int history_index; /* number of used lines in history */
854 int edition_mode; /* index to the edition mode flavors */
855 VARARG(title,unicode_str); /* console title */
856 @END
859 /* appends a string to console's history */
860 @REQ(append_console_input_history)
861 obj_handle_t handle; /* handle to console input, or 0 for process' console */
862 VARARG(line,unicode_str); /* line to add */
863 @END
866 /* appends a string to console's history */
867 @REQ(get_console_input_history)
868 obj_handle_t handle; /* handle to console input, or 0 for process' console */
869 int index; /* index to get line from */
870 @REPLY
871 int total; /* total length of line in Unicode chars */
872 VARARG(line,unicode_str); /* line to add */
873 @END
876 /* creates a new screen buffer on process' console */
877 @REQ(create_console_output)
878 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
879 int access; /* wanted access rights */
880 int share; /* sharing credentials */
881 int inherit; /* inherit flag */
882 @REPLY
883 obj_handle_t handle_out; /* handle to the screen buffer */
884 @END
887 /* Set info about a console (output only) */
888 @REQ(set_console_output_info)
889 obj_handle_t handle; /* handle to the console */
890 int mask; /* setting mask (see below) */
891 short int cursor_size; /* size of cursor (percentage filled) */
892 short int cursor_visible;/* cursor visibility flag */
893 short int cursor_x; /* position of cursor (x, y) */
894 short int cursor_y;
895 short int width; /* width of the screen buffer */
896 short int height; /* height of the screen buffer */
897 short int attr; /* default attribute */
898 short int win_left; /* window actually displayed by renderer */
899 short int win_top; /* the rect area is expressed withing the */
900 short int win_right; /* boundaries of the screen buffer */
901 short int win_bottom;
902 short int max_width; /* maximum size (width x height) for the window */
903 short int max_height;
904 @END
905 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
906 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
907 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
908 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
909 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
910 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
913 /* Get info about a console (output only) */
914 @REQ(get_console_output_info)
915 obj_handle_t handle; /* handle to the console */
916 @REPLY
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
932 /* Add input records to a console input queue */
933 @REQ(write_console_input)
934 obj_handle_t handle; /* handle to the console input */
935 VARARG(rec,input_records); /* input records */
936 @REPLY
937 int written; /* number of records written */
938 @END
941 /* Fetch input records from a console input queue */
942 @REQ(read_console_input)
943 obj_handle_t handle; /* handle to the console input */
944 int flush; /* flush the retrieved records from the queue? */
945 @REPLY
946 int read; /* number of records read */
947 VARARG(rec,input_records); /* input records */
948 @END
951 /* write data (chars and/or attributes) in a screen buffer */
952 @REQ(write_console_output)
953 obj_handle_t handle; /* handle to the console output */
954 int x; /* position where to start writing */
955 int y;
956 int mode; /* char info (see below) */
957 int wrap; /* wrap around at end of line? */
958 VARARG(data,bytes); /* info to write */
959 @REPLY
960 int written; /* number of char infos actually written */
961 int width; /* width of screen buffer */
962 int height; /* height of screen buffer */
963 @END
964 enum char_info_mode
966 CHAR_INFO_MODE_TEXT, /* characters only */
967 CHAR_INFO_MODE_ATTR, /* attributes only */
968 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
969 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
973 /* fill a screen buffer with constant data (chars and/or attributes) */
974 @REQ(fill_console_output)
975 obj_handle_t handle; /* handle to the console output */
976 int x; /* position where to start writing */
977 int y;
978 int mode; /* char info mode */
979 int count; /* number to write */
980 int wrap; /* wrap around at end of line? */
981 char_info_t data; /* data to write */
982 @REPLY
983 int written; /* number of char infos actually written */
984 @END
987 /* read data (chars and/or attributes) from a screen buffer */
988 @REQ(read_console_output)
989 obj_handle_t handle; /* handle to the console output */
990 int x; /* position (x,y) where to start reading */
991 int y;
992 int mode; /* char info mode */
993 int wrap; /* wrap around at end of line? */
994 @REPLY
995 int width; /* width of screen buffer */
996 int height; /* height of screen buffer */
997 VARARG(data,bytes);
998 @END
1001 /* move a rect (of data) in screen buffer content */
1002 @REQ(move_console_output)
1003 obj_handle_t handle; /* handle to the console output */
1004 short int x_src; /* position (x, y) of rect to start moving from */
1005 short int y_src;
1006 short int x_dst; /* position (x, y) of rect to move to */
1007 short int y_dst;
1008 short int w; /* size of the rect (width, height) to move */
1009 short int h;
1010 @END
1013 /* Sends a signal to a process group */
1014 @REQ(send_console_signal)
1015 int signal; /* the signal to send */
1016 process_id_t group_id; /* the group to send the signal to */
1017 @END
1020 /* Create a change notification */
1021 @REQ(create_change_notification)
1022 obj_handle_t handle; /* handle to the directory */
1023 int subtree; /* watch all the subtree */
1024 unsigned int filter; /* notification filter */
1025 @REPLY
1026 obj_handle_t handle; /* handle to the change notification */
1027 @END
1030 /* Move to the next change notification */
1031 @REQ(next_change_notification)
1032 obj_handle_t handle; /* handle to the change notification */
1033 @END
1035 /* Create a file mapping */
1036 @REQ(create_mapping)
1037 int size_high; /* mapping size */
1038 int size_low; /* mapping size */
1039 int protect; /* protection flags (see below) */
1040 unsigned int access; /* wanted access rights */
1041 int inherit; /* inherit flag */
1042 obj_handle_t file_handle; /* file handle */
1043 VARARG(name,unicode_str); /* object name */
1044 @REPLY
1045 obj_handle_t handle; /* handle to the mapping */
1046 @END
1047 /* protection flags */
1048 #define VPROT_READ 0x01
1049 #define VPROT_WRITE 0x02
1050 #define VPROT_EXEC 0x04
1051 #define VPROT_WRITECOPY 0x08
1052 #define VPROT_GUARD 0x10
1053 #define VPROT_NOCACHE 0x20
1054 #define VPROT_COMMITTED 0x40
1055 #define VPROT_IMAGE 0x80
1058 /* Open a mapping */
1059 @REQ(open_mapping)
1060 unsigned int access; /* wanted access rights */
1061 int inherit; /* inherit flag */
1062 VARARG(name,unicode_str); /* object name */
1063 @REPLY
1064 obj_handle_t handle; /* handle to the mapping */
1065 @END
1068 /* Get information about a file mapping */
1069 @REQ(get_mapping_info)
1070 obj_handle_t handle; /* handle to the mapping */
1071 @REPLY
1072 int size_high; /* mapping size */
1073 int size_low; /* mapping size */
1074 int protect; /* protection flags */
1075 int header_size; /* header size (for VPROT_IMAGE mapping) */
1076 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1077 obj_handle_t shared_file; /* shared mapping file handle */
1078 int shared_size; /* shared mapping size */
1079 @END
1082 #define SNAP_HEAPLIST 0x00000001
1083 #define SNAP_PROCESS 0x00000002
1084 #define SNAP_THREAD 0x00000004
1085 #define SNAP_MODULE 0x00000008
1086 /* Create a snapshot */
1087 @REQ(create_snapshot)
1088 int inherit; /* inherit flag */
1089 int flags; /* snapshot flags (SNAP_*) */
1090 process_id_t pid; /* process id */
1091 @REPLY
1092 obj_handle_t handle; /* handle to the snapshot */
1093 @END
1096 /* Get the next process from a snapshot */
1097 @REQ(next_process)
1098 obj_handle_t handle; /* handle to the snapshot */
1099 int reset; /* reset snapshot position? */
1100 @REPLY
1101 int count; /* process usage count */
1102 process_id_t pid; /* process id */
1103 process_id_t ppid; /* parent process id */
1104 void* heap; /* heap base */
1105 void* module; /* main module */
1106 int threads; /* number of threads */
1107 int priority; /* process priority */
1108 int handles; /* number of handles */
1109 VARARG(filename,unicode_str); /* file name of main exe */
1110 @END
1113 /* Get the next thread from a snapshot */
1114 @REQ(next_thread)
1115 obj_handle_t handle; /* handle to the snapshot */
1116 int reset; /* reset snapshot position? */
1117 @REPLY
1118 int count; /* thread usage count */
1119 process_id_t pid; /* process id */
1120 thread_id_t tid; /* thread id */
1121 int base_pri; /* base priority */
1122 int delta_pri; /* delta priority */
1123 @END
1126 /* Get the next module from a snapshot */
1127 @REQ(next_module)
1128 obj_handle_t handle; /* handle to the snapshot */
1129 int reset; /* reset snapshot position? */
1130 @REPLY
1131 process_id_t pid; /* process id */
1132 void* base; /* module base address */
1133 size_t size; /* module size */
1134 VARARG(filename,unicode_str); /* file name of module */
1135 @END
1138 /* Wait for a debug event */
1139 @REQ(wait_debug_event)
1140 int get_handle; /* should we alloc a handle for waiting? */
1141 @REPLY
1142 process_id_t pid; /* process id */
1143 thread_id_t tid; /* thread id */
1144 obj_handle_t wait; /* wait handle if no event ready */
1145 VARARG(event,debug_event); /* debug event data */
1146 @END
1149 /* Queue an exception event */
1150 @REQ(queue_exception_event)
1151 int first; /* first chance exception? */
1152 VARARG(record,exc_event); /* thread context followed by exception record */
1153 @REPLY
1154 obj_handle_t handle; /* handle to the queued event */
1155 @END
1158 /* Retrieve the status of an exception event */
1159 @REQ(get_exception_status)
1160 obj_handle_t handle; /* handle to the queued event */
1161 @REPLY
1162 int status; /* event continuation status */
1163 VARARG(context,context); /* modified thread context */
1164 @END
1167 /* Send an output string to the debugger */
1168 @REQ(output_debug_string)
1169 void* string; /* string to display (in debugged process address space) */
1170 int unicode; /* is it Unicode? */
1171 int length; /* string length */
1172 @END
1175 /* Continue a debug event */
1176 @REQ(continue_debug_event)
1177 process_id_t pid; /* process id to continue */
1178 thread_id_t tid; /* thread id to continue */
1179 int status; /* continuation status */
1180 @END
1183 /* Start/stop debugging an existing process */
1184 @REQ(debug_process)
1185 process_id_t pid; /* id of the process to debug */
1186 int attach; /* 1=attaching / 0=detaching from the process */
1187 @END
1190 /* Simulate a breakpoint in a process */
1191 @REQ(debug_break)
1192 obj_handle_t handle; /* process handle */
1193 @REPLY
1194 int self; /* was it the caller itself? */
1195 @END
1198 /* Set debugger kill on exit flag */
1199 @REQ(set_debugger_kill_on_exit)
1200 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1201 @END
1204 /* Read data from a process address space */
1205 @REQ(read_process_memory)
1206 obj_handle_t handle; /* process handle */
1207 void* addr; /* addr to read from */
1208 @REPLY
1209 VARARG(data,bytes); /* result data */
1210 @END
1213 /* Write data to a process address space */
1214 @REQ(write_process_memory)
1215 obj_handle_t handle; /* process handle */
1216 void* addr; /* addr to write to (must be int-aligned) */
1217 unsigned int first_mask; /* mask for first word */
1218 unsigned int last_mask; /* mask for last word */
1219 VARARG(data,bytes); /* data to write */
1220 @END
1223 /* Create a registry key */
1224 @REQ(create_key)
1225 obj_handle_t parent; /* handle to the parent key */
1226 unsigned int access; /* desired access rights */
1227 unsigned int options; /* creation options */
1228 time_t modif; /* last modification time */
1229 size_t namelen; /* length of key name in bytes */
1230 VARARG(name,unicode_str,namelen); /* key name */
1231 VARARG(class,unicode_str); /* class name */
1232 @REPLY
1233 obj_handle_t hkey; /* handle to the created key */
1234 int created; /* has it been newly created? */
1235 @END
1237 /* Open a registry key */
1238 @REQ(open_key)
1239 obj_handle_t parent; /* handle to the parent key */
1240 unsigned int access; /* desired access rights */
1241 VARARG(name,unicode_str); /* key name */
1242 @REPLY
1243 obj_handle_t hkey; /* handle to the open key */
1244 @END
1247 /* Delete a registry key */
1248 @REQ(delete_key)
1249 obj_handle_t hkey; /* handle to the key */
1250 @END
1253 /* Flush a registry key */
1254 @REQ(flush_key)
1255 obj_handle_t hkey; /* handle to the key */
1256 @END
1259 /* Enumerate registry subkeys */
1260 @REQ(enum_key)
1261 obj_handle_t hkey; /* handle to registry key */
1262 int index; /* index of subkey (or -1 for current key) */
1263 int info_class; /* requested information class */
1264 @REPLY
1265 int subkeys; /* number of subkeys */
1266 int max_subkey; /* longest subkey name */
1267 int max_class; /* longest class name */
1268 int values; /* number of values */
1269 int max_value; /* longest value name */
1270 int max_data; /* longest value data */
1271 time_t modif; /* last modification time */
1272 size_t total; /* total length needed for full name and class */
1273 size_t namelen; /* length of key name in bytes */
1274 VARARG(name,unicode_str,namelen); /* key name */
1275 VARARG(class,unicode_str); /* class name */
1276 @END
1279 /* Set a value of a registry key */
1280 @REQ(set_key_value)
1281 obj_handle_t hkey; /* handle to registry key */
1282 int type; /* value type */
1283 size_t namelen; /* length of value name in bytes */
1284 VARARG(name,unicode_str,namelen); /* value name */
1285 VARARG(data,bytes); /* value data */
1286 @END
1289 /* Retrieve the value of a registry key */
1290 @REQ(get_key_value)
1291 obj_handle_t hkey; /* handle to registry key */
1292 VARARG(name,unicode_str); /* value name */
1293 @REPLY
1294 int type; /* value type */
1295 size_t total; /* total length needed for data */
1296 VARARG(data,bytes); /* value data */
1297 @END
1300 /* Enumerate a value of a registry key */
1301 @REQ(enum_key_value)
1302 obj_handle_t hkey; /* handle to registry key */
1303 int index; /* value index */
1304 int info_class; /* requested information class */
1305 @REPLY
1306 int type; /* value type */
1307 size_t total; /* total length needed for full name and data */
1308 size_t namelen; /* length of value name in bytes */
1309 VARARG(name,unicode_str,namelen); /* value name */
1310 VARARG(data,bytes); /* value data */
1311 @END
1314 /* Delete a value of a registry key */
1315 @REQ(delete_key_value)
1316 obj_handle_t hkey; /* handle to registry key */
1317 VARARG(name,unicode_str); /* value name */
1318 @END
1321 /* Load a registry branch from a file */
1322 @REQ(load_registry)
1323 obj_handle_t hkey; /* root key to load to */
1324 obj_handle_t file; /* file to load from */
1325 VARARG(name,unicode_str); /* subkey name */
1326 @END
1329 /* UnLoad a registry branch from a file */
1330 @REQ(unload_registry)
1331 obj_handle_t hkey; /* root key to unload to */
1332 @END
1335 /* Save a registry branch to a file */
1336 @REQ(save_registry)
1337 obj_handle_t hkey; /* key to save */
1338 obj_handle_t file; /* file to save to */
1339 @END
1342 /* Load the user registry files */
1343 @REQ(load_user_registries)
1344 obj_handle_t hkey; /* key for HKCU */
1345 int saving; /* new saving level */
1346 int period; /* duration between periodic saves (milliseconds) */
1347 @END
1350 /* Add a registry key change notification */
1351 @REQ(set_registry_notification)
1352 obj_handle_t hkey; /* key to watch for changes */
1353 obj_handle_t event; /* event to set */
1354 int subtree; /* should we watch the whole subtree? */
1355 unsigned int filter; /* things to watch */
1356 @END
1359 /* Create a waitable timer */
1360 @REQ(create_timer)
1361 unsigned int access; /* wanted access rights */
1362 int inherit; /* inherit flag */
1363 int manual; /* manual reset */
1364 VARARG(name,unicode_str); /* object name */
1365 @REPLY
1366 obj_handle_t handle; /* handle to the timer */
1367 @END
1370 /* Open a waitable timer */
1371 @REQ(open_timer)
1372 unsigned int access; /* wanted access rights */
1373 int inherit; /* inherit flag */
1374 VARARG(name,unicode_str); /* object name */
1375 @REPLY
1376 obj_handle_t handle; /* handle to the timer */
1377 @END
1379 /* Set a waitable timer */
1380 @REQ(set_timer)
1381 obj_handle_t handle; /* handle to the timer */
1382 abs_time_t expire; /* next expiration absolute time */
1383 int period; /* timer period in ms */
1384 void* callback; /* callback function */
1385 void* arg; /* callback argument */
1386 @REPLY
1387 int signaled; /* was the timer signaled before this call ? */
1388 @END
1390 /* Cancel a waitable timer */
1391 @REQ(cancel_timer)
1392 obj_handle_t handle; /* handle to the timer */
1393 @REPLY
1394 int signaled; /* was the timer signaled before this calltime ? */
1395 @END
1397 /* Get information on a waitable timer */
1398 @REQ(get_timer_info)
1399 obj_handle_t handle; /* handle to the timer */
1400 @REPLY
1401 abs_time_t when; /* absolute time when the timer next expires */
1402 int signaled; /* is the timer signaled? */
1403 @END
1406 /* Retrieve the current context of a thread */
1407 @REQ(get_thread_context)
1408 obj_handle_t handle; /* thread handle */
1409 unsigned int flags; /* context flags */
1410 @REPLY
1411 VARARG(context,context); /* thread context */
1412 @END
1415 /* Set the current context of a thread */
1416 @REQ(set_thread_context)
1417 obj_handle_t handle; /* thread handle */
1418 unsigned int flags; /* context flags */
1419 VARARG(context,context); /* thread context */
1420 @END
1423 /* Fetch a selector entry for a thread */
1424 @REQ(get_selector_entry)
1425 obj_handle_t handle; /* thread handle */
1426 int entry; /* LDT entry */
1427 @REPLY
1428 unsigned int base; /* selector base */
1429 unsigned int limit; /* selector limit */
1430 unsigned char flags; /* selector flags */
1431 @END
1434 /* Add an atom */
1435 @REQ(add_atom)
1436 obj_handle_t table; /* which table to add atom to */
1437 VARARG(name,unicode_str); /* atom name */
1438 @REPLY
1439 atom_t atom; /* resulting atom */
1440 @END
1443 /* Delete an atom */
1444 @REQ(delete_atom)
1445 obj_handle_t table; /* which table to delete atom from */
1446 atom_t atom; /* atom handle */
1447 @END
1450 /* Find an atom */
1451 @REQ(find_atom)
1452 obj_handle_t table; /* which table to find atom from */
1453 VARARG(name,unicode_str); /* atom name */
1454 @REPLY
1455 atom_t atom; /* atom handle */
1456 @END
1459 /* Get information about an atom */
1460 @REQ(get_atom_information)
1461 obj_handle_t table; /* which table to find atom from */
1462 atom_t atom; /* atom handle */
1463 @REPLY
1464 int count; /* atom lock count */
1465 int pinned; /* whether the atom has been pinned */
1466 VARARG(name,unicode_str); /* atom name */
1467 @END
1470 /* Set information about an atom */
1471 @REQ(set_atom_information)
1472 obj_handle_t table; /* which table to find atom from */
1473 atom_t atom; /* atom handle */
1474 int pinned; /* whether to bump atom information */
1475 @END
1478 /* Empty an atom table */
1479 @REQ(empty_atom_table)
1480 obj_handle_t table; /* which table to find atom from */
1481 int if_pinned; /* whether to delete pinned atoms */
1482 @END
1485 /* Init an atom table */
1486 @REQ(init_atom_table)
1487 int entries; /* number of entries (only for local) */
1488 @REPLY
1489 obj_handle_t table; /* handle to the atom table */
1490 @END
1493 /* Get the message queue of the current thread */
1494 @REQ(get_msg_queue)
1495 @REPLY
1496 obj_handle_t handle; /* handle to the queue */
1497 @END
1500 /* Set the current message queue wakeup mask */
1501 @REQ(set_queue_mask)
1502 unsigned int wake_mask; /* wakeup bits mask */
1503 unsigned int changed_mask; /* changed bits mask */
1504 int skip_wait; /* will we skip waiting if signaled? */
1505 @REPLY
1506 unsigned int wake_bits; /* current wake bits */
1507 unsigned int changed_bits; /* current changed bits */
1508 @END
1511 /* Get the current message queue status */
1512 @REQ(get_queue_status)
1513 int clear; /* should we clear the change bits? */
1514 @REPLY
1515 unsigned int wake_bits; /* wake bits */
1516 unsigned int changed_bits; /* changed bits since last time */
1517 @END
1520 /* Wait for a process to start waiting on input */
1521 @REQ(wait_input_idle)
1522 obj_handle_t handle; /* process handle */
1523 int timeout; /* timeout */
1524 @REPLY
1525 obj_handle_t event; /* handle to idle event */
1526 @END
1529 /* Send a message to a thread queue */
1530 @REQ(send_message)
1531 thread_id_t id; /* thread id */
1532 int type; /* message type (see below) */
1533 int flags; /* message flags (see below) */
1534 user_handle_t win; /* window handle */
1535 unsigned int msg; /* message code */
1536 unsigned int wparam; /* parameters */
1537 unsigned int lparam; /* parameters */
1538 int x; /* x position */
1539 int y; /* y position */
1540 unsigned int time; /* message time */
1541 unsigned int info; /* extra info */
1542 int timeout; /* timeout for reply */
1543 void* callback; /* callback address */
1544 VARARG(data,bytes); /* message data for sent messages */
1545 @END
1547 enum message_type
1549 MSG_ASCII, /* Ascii message (from SendMessageA) */
1550 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1551 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1552 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1553 MSG_CALLBACK_RESULT,/* result of a callback message */
1554 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1555 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1556 MSG_HARDWARE, /* hardware message */
1557 MSG_WINEVENT /* winevent message */
1559 #define SEND_MSG_ABORT_IF_HUNG 0x01
1562 /* Get a message from the current queue */
1563 @REQ(get_message)
1564 int flags; /* see below */
1565 user_handle_t get_win; /* window handle to get */
1566 unsigned int get_first; /* first message code to get */
1567 unsigned int get_last; /* last message code to get */
1568 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1569 @REPLY
1570 int type; /* message type */
1571 user_handle_t win; /* window handle */
1572 unsigned int msg; /* message code */
1573 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1574 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1575 int x; /* x position */
1576 int y; /* y position */
1577 user_handle_t hook; /* winevent hook handle */
1578 void* hook_proc; /* winevent hook proc address */
1579 unsigned int time; /* message time */
1580 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1581 unsigned int hw_id; /* id if hardware message */
1582 unsigned int active_hooks; /* active hooks bitmap */
1583 size_t total; /* total size of extra data */
1584 VARARG(data,bytes); /* message data for sent messages */
1585 @END
1586 #define GET_MSG_REMOVE 1 /* remove the message */
1587 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1589 /* Reply to a sent message */
1590 @REQ(reply_message)
1591 unsigned int result; /* message result */
1592 int remove; /* should we remove the message? */
1593 VARARG(data,bytes); /* message data for sent messages */
1594 @END
1597 /* Accept the current hardware message */
1598 @REQ(accept_hardware_message)
1599 unsigned int hw_id; /* id of the hardware message */
1600 int remove; /* should we remove the message? */
1601 user_handle_t new_win; /* new destination window for current message */
1602 @END
1605 /* Retrieve the reply for the last message sent */
1606 @REQ(get_message_reply)
1607 int cancel; /* cancel message if not ready? */
1608 @REPLY
1609 unsigned int result; /* message result */
1610 VARARG(data,bytes); /* message data for sent messages */
1611 @END
1614 /* Set a window timer */
1615 @REQ(set_win_timer)
1616 user_handle_t win; /* window handle */
1617 unsigned int msg; /* message to post */
1618 unsigned int id; /* timer id */
1619 unsigned int rate; /* timer rate in ms */
1620 unsigned int lparam; /* message lparam (callback proc) */
1621 @REPLY
1622 unsigned int id; /* timer id */
1623 @END
1626 /* Kill a window timer */
1627 @REQ(kill_win_timer)
1628 user_handle_t win; /* window handle */
1629 unsigned int msg; /* message to post */
1630 unsigned int id; /* timer id */
1631 @END
1634 /* Retrieve info about a serial port */
1635 @REQ(get_serial_info)
1636 obj_handle_t handle; /* handle to comm port */
1637 @REPLY
1638 unsigned int readinterval;
1639 unsigned int readconst;
1640 unsigned int readmult;
1641 unsigned int writeconst;
1642 unsigned int writemult;
1643 unsigned int eventmask;
1644 unsigned int commerror;
1645 @END
1648 /* Set info about a serial port */
1649 @REQ(set_serial_info)
1650 obj_handle_t handle; /* handle to comm port */
1651 int flags; /* bitmask to set values (see below) */
1652 unsigned int readinterval;
1653 unsigned int readconst;
1654 unsigned int readmult;
1655 unsigned int writeconst;
1656 unsigned int writemult;
1657 unsigned int eventmask;
1658 unsigned int commerror;
1659 @END
1660 #define SERIALINFO_SET_TIMEOUTS 0x01
1661 #define SERIALINFO_SET_MASK 0x02
1662 #define SERIALINFO_SET_ERROR 0x04
1665 /* Create an async I/O */
1666 @REQ(register_async)
1667 obj_handle_t handle; /* handle to comm port, socket or file */
1668 int type; /* type of queue to look after */
1669 void* io_apc; /* APC routine to queue upon end of async */
1670 void* io_sb; /* I/O status block (unique across all async on this handle) */
1671 void* io_user; /* data to pass back to caller */
1672 int count; /* count - usually # of bytes to be read/written */
1673 @END
1674 #define ASYNC_TYPE_READ 0x01
1675 #define ASYNC_TYPE_WRITE 0x02
1676 #define ASYNC_TYPE_WAIT 0x03
1679 /* Cancel all async op on a fd */
1680 @REQ(cancel_async)
1681 obj_handle_t handle; /* handle to comm port, socket or file */
1682 @END
1685 /* Create a named pipe */
1686 @REQ(create_named_pipe)
1687 unsigned int options;
1688 unsigned int flags;
1689 unsigned int maxinstances;
1690 unsigned int outsize;
1691 unsigned int insize;
1692 unsigned int timeout;
1693 int inherit; /* inherit flag */
1694 VARARG(name,unicode_str); /* pipe name */
1695 @REPLY
1696 obj_handle_t handle; /* handle to the pipe */
1697 @END
1699 /* flags in create_named_pipe and get_named_pipe_info */
1700 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1701 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1702 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1705 /* Open an existing named pipe */
1706 @REQ(open_named_pipe)
1707 unsigned int access;
1708 int inherit; /* inherit flag */
1709 VARARG(name,unicode_str); /* pipe name */
1710 @REPLY
1711 obj_handle_t handle; /* handle to the pipe */
1712 @END
1715 /* Connect to a named pipe */
1716 @REQ(connect_named_pipe)
1717 obj_handle_t handle;
1718 void* overlapped;
1719 void* func;
1720 @END
1723 /* Wait for a named pipe */
1724 @REQ(wait_named_pipe)
1725 unsigned int timeout;
1726 void* overlapped;
1727 void* func;
1728 VARARG(name,unicode_str); /* pipe name */
1729 @END
1732 /* Disconnect a named pipe */
1733 @REQ(disconnect_named_pipe)
1734 obj_handle_t handle;
1735 @REPLY
1736 int fd; /* associated fd to close */
1737 @END
1740 @REQ(get_named_pipe_info)
1741 obj_handle_t handle;
1742 @REPLY
1743 unsigned int flags;
1744 unsigned int maxinstances;
1745 unsigned int outsize;
1746 unsigned int insize;
1747 @END
1750 /* Create a window */
1751 @REQ(create_window)
1752 user_handle_t parent; /* parent window */
1753 user_handle_t owner; /* owner window */
1754 atom_t atom; /* class atom */
1755 void* instance; /* module instance */
1756 @REPLY
1757 user_handle_t handle; /* created window */
1758 int extra; /* number of extra bytes */
1759 void* class_ptr; /* pointer to class in client address space */
1760 @END
1763 /* Destroy a window */
1764 @REQ(destroy_window)
1765 user_handle_t handle; /* handle to the window */
1766 @END
1769 /* Set a window owner */
1770 @REQ(set_window_owner)
1771 user_handle_t handle; /* handle to the window */
1772 user_handle_t owner; /* new owner */
1773 @REPLY
1774 user_handle_t full_owner; /* full handle of new owner */
1775 user_handle_t prev_owner; /* full handle of previous owner */
1776 @END
1779 /* Get information from a window handle */
1780 @REQ(get_window_info)
1781 user_handle_t handle; /* handle to the window */
1782 @REPLY
1783 user_handle_t full_handle; /* full 32-bit handle */
1784 user_handle_t last_active; /* last active popup */
1785 process_id_t pid; /* process owning the window */
1786 thread_id_t tid; /* thread owning the window */
1787 atom_t atom; /* class atom */
1788 @END
1791 /* Set some information in a window */
1792 @REQ(set_window_info)
1793 user_handle_t handle; /* handle to the window */
1794 unsigned int flags; /* flags for fields to set (see below) */
1795 unsigned int style; /* window style */
1796 unsigned int ex_style; /* window extended style */
1797 unsigned int id; /* window id */
1798 void* instance; /* creator instance */
1799 void* user_data; /* user-specific data */
1800 int extra_offset; /* offset to set in extra bytes */
1801 size_t extra_size; /* size to set in extra bytes */
1802 unsigned int extra_value; /* value to set in extra bytes */
1803 @REPLY
1804 unsigned int old_style; /* old window style */
1805 unsigned int old_ex_style; /* old window extended style */
1806 unsigned int old_id; /* old window id */
1807 void* old_instance; /* old creator instance */
1808 void* old_user_data; /* old user-specific data */
1809 unsigned int old_extra_value; /* old value in extra bytes */
1810 @END
1811 #define SET_WIN_STYLE 0x01
1812 #define SET_WIN_EXSTYLE 0x02
1813 #define SET_WIN_ID 0x04
1814 #define SET_WIN_INSTANCE 0x08
1815 #define SET_WIN_USERDATA 0x10
1816 #define SET_WIN_EXTRA 0x20
1819 /* Set the parent of a window */
1820 @REQ(set_parent)
1821 user_handle_t handle; /* handle to the window */
1822 user_handle_t parent; /* handle to the parent */
1823 @REPLY
1824 user_handle_t old_parent; /* old parent window */
1825 user_handle_t full_parent; /* full handle of new parent */
1826 @END
1829 /* Get a list of the window parents, up to the root of the tree */
1830 @REQ(get_window_parents)
1831 user_handle_t handle; /* handle to the window */
1832 @REPLY
1833 int count; /* total count of parents */
1834 VARARG(parents,user_handles); /* parent handles */
1835 @END
1838 /* Get a list of the window children */
1839 @REQ(get_window_children)
1840 user_handle_t parent; /* parent window */
1841 atom_t atom; /* class atom for the listed children */
1842 thread_id_t tid; /* thread owning the listed children */
1843 @REPLY
1844 int count; /* total count of children */
1845 VARARG(children,user_handles); /* children handles */
1846 @END
1849 /* Get a list of the window children that contain a given point */
1850 @REQ(get_window_children_from_point)
1851 user_handle_t parent; /* parent window */
1852 int x; /* point in parent coordinates */
1853 int y;
1854 @REPLY
1855 int count; /* total count of children */
1856 VARARG(children,user_handles); /* children handles */
1857 @END
1860 /* Get window tree information from a window handle */
1861 @REQ(get_window_tree)
1862 user_handle_t handle; /* handle to the window */
1863 @REPLY
1864 user_handle_t parent; /* parent window */
1865 user_handle_t owner; /* owner window */
1866 user_handle_t next_sibling; /* next sibling in Z-order */
1867 user_handle_t prev_sibling; /* prev sibling in Z-order */
1868 user_handle_t first_sibling; /* first sibling in Z-order */
1869 user_handle_t last_sibling; /* last sibling in Z-order */
1870 user_handle_t first_child; /* first child */
1871 user_handle_t last_child; /* last child */
1872 @END
1874 /* Set the position and Z order of a window */
1875 @REQ(set_window_pos)
1876 user_handle_t handle; /* handle to the window */
1877 user_handle_t previous; /* previous window in Z order */
1878 unsigned int flags; /* SWP_* flags */
1879 rectangle_t window; /* window rectangle */
1880 rectangle_t client; /* client rectangle */
1881 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1882 @REPLY
1883 unsigned int new_style; /* new window style */
1884 @END
1887 /* Get the window and client rectangles of a window */
1888 @REQ(get_window_rectangles)
1889 user_handle_t handle; /* handle to the window */
1890 @REPLY
1891 rectangle_t window; /* window rectangle */
1892 rectangle_t visible; /* visible part of the window rectangle */
1893 rectangle_t client; /* client rectangle */
1894 @END
1897 /* Get the window text */
1898 @REQ(get_window_text)
1899 user_handle_t handle; /* handle to the window */
1900 @REPLY
1901 VARARG(text,unicode_str); /* window text */
1902 @END
1905 /* Set the window text */
1906 @REQ(set_window_text)
1907 user_handle_t handle; /* handle to the window */
1908 VARARG(text,unicode_str); /* window text */
1909 @END
1912 /* Get the coordinates offset between two windows */
1913 @REQ(get_windows_offset)
1914 user_handle_t from; /* handle to the first window */
1915 user_handle_t to; /* handle to the second window */
1916 @REPLY
1917 int x; /* x coordinate offset */
1918 int y; /* y coordinate offset */
1919 @END
1922 /* Get the visible region of a window */
1923 @REQ(get_visible_region)
1924 user_handle_t window; /* handle to the window */
1925 unsigned int flags; /* DCX flags */
1926 @REPLY
1927 user_handle_t top_win; /* top window to clip against */
1928 int top_org_x; /* top window visible rect origin in screen coords */
1929 int top_org_y;
1930 int win_org_x; /* window rect origin in screen coords */
1931 int win_org_y;
1932 size_t total_size; /* total size of the resulting region */
1933 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
1934 @END
1937 /* Get the window region */
1938 @REQ(get_window_region)
1939 user_handle_t window; /* handle to the window */
1940 @REPLY
1941 size_t total_size; /* total size of the resulting region */
1942 VARARG(region,rectangles); /* list of rectangles for the region */
1943 @END
1946 /* Set the window region */
1947 @REQ(set_window_region)
1948 user_handle_t window; /* handle to the window */
1949 VARARG(region,rectangles); /* list of rectangles for the region */
1950 @END
1953 /* Get the window update region */
1954 @REQ(get_update_region)
1955 user_handle_t window; /* handle to the window */
1956 unsigned int flags; /* update flags (see below) */
1957 @REPLY
1958 user_handle_t child; /* child to repaint (or window itself) */
1959 unsigned int flags; /* resulting update flags (see below) */
1960 size_t total_size; /* total size of the resulting region */
1961 VARARG(region,rectangles); /* list of rectangles for the region */
1962 @END
1963 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
1964 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
1965 #define UPDATE_PAINT 0x04 /* get region for painting client area */
1966 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
1967 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
1968 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
1969 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
1972 /* Update the z order of a window so that a given rectangle is fully visible */
1973 @REQ(update_window_zorder)
1974 user_handle_t window; /* handle to the window */
1975 rectangle_t rect; /* rectangle that must be visible */
1976 @END
1979 /* Mark parts of a window as needing a redraw */
1980 @REQ(redraw_window)
1981 user_handle_t window; /* handle to the window */
1982 unsigned int flags; /* RDW_* flags */
1983 VARARG(region,rectangles); /* list of rectangles for the region */
1984 @END
1987 /* Set a window property */
1988 @REQ(set_window_property)
1989 user_handle_t window; /* handle to the window */
1990 atom_t atom; /* property atom (if no name specified) */
1991 obj_handle_t handle; /* handle to store */
1992 VARARG(name,unicode_str); /* property name */
1993 @END
1996 /* Remove a window property */
1997 @REQ(remove_window_property)
1998 user_handle_t window; /* handle to the window */
1999 atom_t atom; /* property atom (if no name specified) */
2000 VARARG(name,unicode_str); /* property name */
2001 @REPLY
2002 obj_handle_t handle; /* handle stored in property */
2003 @END
2006 /* Get a window property */
2007 @REQ(get_window_property)
2008 user_handle_t window; /* handle to the window */
2009 atom_t atom; /* property atom (if no name specified) */
2010 VARARG(name,unicode_str); /* property name */
2011 @REPLY
2012 obj_handle_t handle; /* handle stored in property */
2013 @END
2016 /* Get the list of properties of a window */
2017 @REQ(get_window_properties)
2018 user_handle_t window; /* handle to the window */
2019 @REPLY
2020 int total; /* total number of properties */
2021 VARARG(props,properties); /* list of properties */
2022 @END
2025 /* Attach (or detach) thread inputs */
2026 @REQ(attach_thread_input)
2027 thread_id_t tid_from; /* thread to be attached */
2028 thread_id_t tid_to; /* thread to which tid_from should be attached */
2029 int attach; /* is it an attach? */
2030 @END
2033 /* Get input data for a given thread */
2034 @REQ(get_thread_input)
2035 thread_id_t tid; /* id of thread */
2036 @REPLY
2037 user_handle_t focus; /* handle to the focus window */
2038 user_handle_t capture; /* handle to the capture window */
2039 user_handle_t active; /* handle to the active window */
2040 user_handle_t foreground; /* handle to the global foreground window */
2041 user_handle_t menu_owner; /* handle to the menu owner */
2042 user_handle_t move_size; /* handle to the moving/resizing window */
2043 user_handle_t caret; /* handle to the caret window */
2044 rectangle_t rect; /* caret rectangle */
2045 @END
2048 /* Get the time of the last input event */
2049 @REQ(get_last_input_time)
2050 @REPLY
2051 unsigned int time;
2052 @END
2055 /* Retrieve queue keyboard state for a given thread */
2056 @REQ(get_key_state)
2057 thread_id_t tid; /* id of thread */
2058 int key; /* optional key code or -1 */
2059 @REPLY
2060 unsigned char state; /* state of specified key */
2061 VARARG(keystate,bytes); /* state array for all the keys */
2062 @END
2064 /* Set queue keyboard state for a given thread */
2065 @REQ(set_key_state)
2066 thread_id_t tid; /* id of thread */
2067 VARARG(keystate,bytes); /* state array for all the keys */
2068 @END
2070 /* Set the system foreground window */
2071 @REQ(set_foreground_window)
2072 user_handle_t handle; /* handle to the foreground window */
2073 @REPLY
2074 user_handle_t previous; /* handle to the previous foreground window */
2075 int send_msg_old; /* whether we have to send a msg to the old window */
2076 int send_msg_new; /* whether we have to send a msg to the new window */
2077 @END
2079 /* Set the current thread focus window */
2080 @REQ(set_focus_window)
2081 user_handle_t handle; /* handle to the focus window */
2082 @REPLY
2083 user_handle_t previous; /* handle to the previous focus window */
2084 @END
2086 /* Set the current thread active window */
2087 @REQ(set_active_window)
2088 user_handle_t handle; /* handle to the active window */
2089 @REPLY
2090 user_handle_t previous; /* handle to the previous active window */
2091 @END
2093 /* Set the current thread capture window */
2094 @REQ(set_capture_window)
2095 user_handle_t handle; /* handle to the capture window */
2096 unsigned int flags; /* capture flags (see below) */
2097 @REPLY
2098 user_handle_t previous; /* handle to the previous capture window */
2099 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2100 @END
2101 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2102 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2105 /* Set the current thread caret window */
2106 @REQ(set_caret_window)
2107 user_handle_t handle; /* handle to the caret window */
2108 int width; /* caret width */
2109 int height; /* caret height */
2110 @REPLY
2111 user_handle_t previous; /* handle to the previous caret window */
2112 rectangle_t old_rect; /* previous caret rectangle */
2113 int old_hide; /* previous hide count */
2114 int old_state; /* previous caret state (1=on, 0=off) */
2115 @END
2118 /* Set the current thread caret information */
2119 @REQ(set_caret_info)
2120 unsigned int flags; /* caret flags (see below) */
2121 user_handle_t handle; /* handle to the caret window */
2122 int x; /* caret x position */
2123 int y; /* caret y position */
2124 int hide; /* increment for hide count (can be negative to show it) */
2125 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2126 @REPLY
2127 user_handle_t full_handle; /* handle to the current caret window */
2128 rectangle_t old_rect; /* previous caret rectangle */
2129 int old_hide; /* previous hide count */
2130 int old_state; /* previous caret state (1=on, 0=off) */
2131 @END
2132 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2133 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2134 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2137 /* Set a window hook */
2138 @REQ(set_hook)
2139 int id; /* id of the hook */
2140 process_id_t pid; /* id of process to set the hook into */
2141 thread_id_t tid; /* id of thread to set the hook into */
2142 int event_min;
2143 int event_max;
2144 int flags;
2145 void* proc; /* hook procedure */
2146 int unicode; /* is it a unicode hook? */
2147 VARARG(module,unicode_str); /* module name */
2148 @REPLY
2149 user_handle_t handle; /* handle to the hook */
2150 unsigned int active_hooks; /* active hooks bitmap */
2151 @END
2154 /* Remove a window hook */
2155 @REQ(remove_hook)
2156 user_handle_t handle; /* handle to the hook */
2157 int id; /* id of the hook if handle is 0 */
2158 void* proc; /* hook procedure if handle is 0 */
2159 @REPLY
2160 unsigned int active_hooks; /* active hooks bitmap */
2161 @END
2164 /* Start calling a hook chain */
2165 @REQ(start_hook_chain)
2166 int id; /* id of the hook */
2167 int event; /* signalled event */
2168 user_handle_t window; /* handle to the event window */
2169 int object_id; /* object id for out of context winevent */
2170 int child_id; /* child id for out of context winevent */
2171 @REPLY
2172 user_handle_t handle; /* handle to the next hook */
2173 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2174 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2175 void* proc; /* hook procedure */
2176 int unicode; /* is it a unicode hook? */
2177 unsigned int active_hooks; /* active hooks bitmap */
2178 VARARG(module,unicode_str); /* module name */
2179 @END
2182 /* Finished calling a hook chain */
2183 @REQ(finish_hook_chain)
2184 int id; /* id of the hook */
2185 @END
2188 /* Get the next hook to call */
2189 @REQ(get_next_hook)
2190 user_handle_t handle; /* handle to the current hook */
2191 int event; /* signalled event */
2192 user_handle_t window; /* handle to the event window */
2193 int object_id; /* object id for out of context winevent */
2194 int child_id; /* child id for out of context winevent */
2195 @REPLY
2196 user_handle_t next; /* handle to the next hook */
2197 int id; /* id of the next hook */
2198 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2199 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2200 void* proc; /* next hook procedure */
2201 int prev_unicode; /* was the previous a unicode hook? */
2202 int next_unicode; /* is the next a unicode hook? */
2203 VARARG(module,unicode_str); /* module name */
2204 @END
2207 /* Create a window class */
2208 @REQ(create_class)
2209 int local; /* is it a local class? */
2210 atom_t atom; /* class atom */
2211 unsigned int style; /* class style */
2212 void* instance; /* module instance */
2213 int extra; /* number of extra class bytes */
2214 int win_extra; /* number of window extra bytes */
2215 void* client_ptr; /* pointer to class in client address space */
2216 @END
2219 /* Destroy a window class */
2220 @REQ(destroy_class)
2221 atom_t atom; /* class atom */
2222 void* instance; /* module instance */
2223 @REPLY
2224 void* client_ptr; /* pointer to class in client address space */
2225 @END
2228 /* Set some information in a class */
2229 @REQ(set_class_info)
2230 user_handle_t window; /* handle to the window */
2231 unsigned int flags; /* flags for info to set (see below) */
2232 atom_t atom; /* class atom */
2233 unsigned int style; /* class style */
2234 int win_extra; /* number of window extra bytes */
2235 void* instance; /* module instance */
2236 int extra_offset; /* offset to set in extra bytes */
2237 size_t extra_size; /* size to set in extra bytes */
2238 unsigned int extra_value; /* value to set in extra bytes */
2239 @REPLY
2240 atom_t old_atom; /* previous class atom */
2241 unsigned int old_style; /* previous class style */
2242 int old_extra; /* previous number of class extra bytes */
2243 int old_win_extra; /* previous number of window extra bytes */
2244 void* old_instance; /* previous module instance */
2245 unsigned int old_extra_value; /* old value in extra bytes */
2246 @END
2247 #define SET_CLASS_ATOM 0x0001
2248 #define SET_CLASS_STYLE 0x0002
2249 #define SET_CLASS_WINEXTRA 0x0004
2250 #define SET_CLASS_INSTANCE 0x0008
2251 #define SET_CLASS_EXTRA 0x0010
2254 /* Set/get clipboard information */
2255 @REQ(set_clipboard_info)
2256 unsigned int flags; /* flags for fields to set (see below) */
2257 user_handle_t clipboard; /* clipboard window */
2258 user_handle_t owner; /* clipboard owner */
2259 user_handle_t viewer; /* first clipboard viewer */
2260 unsigned int seqno; /* change sequence number */
2261 @REPLY
2262 unsigned int flags; /* status flags (see below) */
2263 user_handle_t old_clipboard; /* old clipboard window */
2264 user_handle_t old_owner; /* old clipboard owner */
2265 user_handle_t old_viewer; /* old clipboard viewer */
2266 unsigned int seqno; /* current sequence number */
2267 @END
2269 #define SET_CB_OPEN 0x001
2270 #define SET_CB_OWNER 0x002
2271 #define SET_CB_VIEWER 0x004
2272 #define SET_CB_SEQNO 0x008
2273 #define SET_CB_RELOWNER 0x010
2274 #define SET_CB_CLOSE 0x020
2275 #define CB_OPEN 0x040
2276 #define CB_OWNER 0x080
2277 #define CB_PROCESS 0x100
2280 /* Open a security token */
2281 @REQ(open_token)
2282 obj_handle_t handle; /* handle to the thread or process */
2283 unsigned int flags; /* flags (see below) */
2284 @REPLY
2285 obj_handle_t token; /* handle to the token */
2286 @END
2287 #define OPEN_TOKEN_THREAD 1
2288 #define OPEN_TOKEN_AS_SELF 2
2291 /* Set/get the global windows */
2292 @REQ(set_global_windows)
2293 unsigned int flags; /* flags for fields to set (see below) */
2294 user_handle_t shell_window; /* handle to the new shell window */
2295 user_handle_t shell_listview; /* handle to the new shell listview window */
2296 user_handle_t progman_window; /* handle to the new program manager window */
2297 user_handle_t taskman_window; /* handle to the new task manager window */
2298 @REPLY
2299 user_handle_t old_shell_window; /* handle to the shell window */
2300 user_handle_t old_shell_listview; /* handle to the shell listview window */
2301 user_handle_t old_progman_window; /* handle to the new program manager window */
2302 user_handle_t old_taskman_window; /* handle to the new task manager window */
2303 @END
2304 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2305 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2306 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2308 /* Adjust the privileges held by a token */
2309 @REQ(adjust_token_privileges)
2310 obj_handle_t handle; /* handle to the token */
2311 int disable_all; /* disable all privileges? */
2312 int get_modified_state; /* get modified privileges? */
2313 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2314 @REPLY
2315 unsigned int len; /* total length in bytes required to store token privileges */
2316 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2317 @END
2319 /* Retrieves the set of privileges held by or available to a token */
2320 @REQ(get_token_privileges)
2321 obj_handle_t handle; /* handle to the token */
2322 @REPLY
2323 unsigned int len; /* total length in bytes required to store token privileges */
2324 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2325 @END
2327 /* Check the token has the required privileges */
2328 @REQ(check_token_privileges)
2329 obj_handle_t handle; /* handle to the token */
2330 int all_required; /* are all the privileges required for the check to succeed? */
2331 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2332 @REPLY
2333 int has_privileges; /* does the token have the required privileges? */
2334 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2335 @END
2337 @REQ(duplicate_token)
2338 obj_handle_t handle; /* handle to the token to duplicate */
2339 unsigned int access; /* access rights to the new token */
2340 int inherit; /* inherit flag */
2341 int primary; /* is the new token to be a primary one? */
2342 int impersonation_level; /* impersonation level of the new token */
2343 @REPLY
2344 obj_handle_t new_handle; /* duplicated handle */
2345 @END
2347 @REQ(access_check)
2348 obj_handle_t handle; /* handle to the token */
2349 unsigned int desired_access; /* desired access to the object */
2350 unsigned int mapping_read; /* mapping from generic read to specific rights */
2351 unsigned int mapping_write; /* mapping from generic write to specific rights */
2352 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2353 unsigned int mapping_all; /* mapping from generic all to specific rights */
2354 VARARG(sd,security_descriptor); /* security descriptor to check */
2355 @REPLY
2356 unsigned int access_granted; /* access rights actually granted */
2357 unsigned int access_status; /* was access granted? */
2358 unsigned int privileges_len; /* length needed to store privileges */
2359 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2360 @END
2362 /* Create a mailslot */
2363 @REQ(create_mailslot)
2364 unsigned int max_msgsize;
2365 unsigned int read_timeout;
2366 int inherit;
2367 VARARG(name,unicode_str); /* mailslot name */
2368 @REPLY
2369 obj_handle_t handle; /* handle to the mailslot */
2370 @END
2373 /* Open an existing mailslot */
2374 @REQ(open_mailslot)
2375 unsigned int access;
2376 int inherit; /* inherit flag */
2377 unsigned int sharing; /* sharing mode */
2378 VARARG(name,unicode_str); /* mailslot name */
2379 @REPLY
2380 obj_handle_t handle; /* handle to the mailslot */
2381 @END
2384 /* Set mailslot information */
2385 @REQ(set_mailslot_info)
2386 obj_handle_t handle; /* handle to the mailslot */
2387 unsigned int flags;
2388 unsigned int read_timeout;
2389 @REPLY
2390 unsigned int max_msgsize;
2391 unsigned int read_timeout;
2392 unsigned int msg_count;
2393 unsigned int next_msgsize;
2394 @END
2395 #define MAILSLOT_SET_READ_TIMEOUT 1