No need continuing tests if no NetUserGetInfo.
[wine/multimedia.git] / server / protocol.def
blobb6553e24063a94fc800414110fe1347de592817d
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 /****************************************************************/
182 /* Request declarations */
184 /* Create a new process from the context of the parent */
185 @REQ(new_process)
186 int inherit_all; /* inherit all handles from parent */
187 int create_flags; /* creation flags */
188 int unix_pid; /* Unix pid of new process */
189 obj_handle_t exe_file; /* file handle for main exe */
190 obj_handle_t hstdin; /* handle for stdin */
191 obj_handle_t hstdout; /* handle for stdout */
192 obj_handle_t hstderr; /* handle for stderr */
193 VARARG(info,startup_info); /* startup information */
194 VARARG(env,unicode_str); /* environment for new process */
195 @REPLY
196 obj_handle_t info; /* new process info handle */
197 @END
200 /* Retrieve information about a newly started process */
201 @REQ(get_new_process_info)
202 obj_handle_t info; /* info handle returned from new_process_request */
203 int pinherit; /* process handle inherit flag */
204 int tinherit; /* thread handle inherit flag */
205 @REPLY
206 process_id_t pid; /* process id */
207 obj_handle_t phandle; /* process handle (in the current process) */
208 thread_id_t tid; /* thread id */
209 obj_handle_t thandle; /* thread handle (in the current process) */
210 int success; /* did the process start successfully? */
211 @END
214 /* Create a new thread from the context of the parent */
215 @REQ(new_thread)
216 int suspend; /* new thread should be suspended on creation */
217 int inherit; /* inherit flag */
218 int request_fd; /* fd for request pipe */
219 @REPLY
220 thread_id_t tid; /* thread id */
221 obj_handle_t handle; /* thread handle (in the current process) */
222 @END
225 /* Signal that we are finished booting on the client side */
226 @REQ(boot_done)
227 int debug_level; /* new debug level */
228 @END
231 /* Initialize a process; called from the new process context */
232 @REQ(init_process)
233 void* peb; /* addr of PEB */
234 void* ldt_copy; /* addr of LDT copy */
235 @REPLY
236 int create_flags; /* creation flags */
237 unsigned int server_start; /* server start time (GetTickCount) */
238 size_t info_size; /* total size of startup info */
239 obj_handle_t exe_file; /* file handle for main exe */
240 obj_handle_t hstdin; /* handle for stdin */
241 obj_handle_t hstdout; /* handle for stdout */
242 obj_handle_t hstderr; /* handle for stderr */
243 @END
246 /* Retrieve the new process startup info */
247 @REQ(get_startup_info)
248 @REPLY
249 VARARG(info,startup_info); /* startup information */
250 VARARG(env,unicode_str); /* environment */
251 @END
254 /* Signal the end of the process initialization */
255 @REQ(init_process_done)
256 void* module; /* main module base address */
257 size_t module_size; /* main module size */
258 void* entry; /* process entry point */
259 void* name; /* ptr to ptr to name (in process addr space) */
260 obj_handle_t exe_file; /* file handle for main exe */
261 int gui; /* is it a GUI process? */
262 VARARG(filename,unicode_str); /* file name of main exe */
263 @END
266 /* Initialize a thread; called from the child after fork()/clone() */
267 @REQ(init_thread)
268 int unix_pid; /* Unix pid of new thread */
269 int unix_tid; /* Unix tid of new thread */
270 void* teb; /* TEB of new thread (in thread address space) */
271 void* entry; /* thread entry point (in thread address space) */
272 int reply_fd; /* fd for reply pipe */
273 int wait_fd; /* fd for blocking calls pipe */
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 int boot; /* is this the boot thread? */
278 int version; /* protocol version */
279 @END
282 /* Terminate a process */
283 @REQ(terminate_process)
284 obj_handle_t handle; /* process handle to terminate */
285 int exit_code; /* process exit code */
286 @REPLY
287 int self; /* suicide? */
288 @END
291 /* Terminate a thread */
292 @REQ(terminate_thread)
293 obj_handle_t handle; /* thread handle to terminate */
294 int exit_code; /* thread exit code */
295 @REPLY
296 int self; /* suicide? */
297 int last; /* last thread in this process? */
298 @END
301 /* Retrieve information about a process */
302 @REQ(get_process_info)
303 obj_handle_t handle; /* process handle */
304 @REPLY
305 process_id_t pid; /* server process id */
306 process_id_t ppid; /* server process id of parent */
307 int exit_code; /* process exit code */
308 int priority; /* priority class */
309 int process_affinity; /* process affinity mask */
310 int system_affinity; /* system 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 @END
349 #define SET_THREAD_INFO_PRIORITY 0x01
350 #define SET_THREAD_INFO_AFFINITY 0x02
353 /* Retrieve information about a module */
354 @REQ(get_dll_info)
355 obj_handle_t handle; /* process handle */
356 void* base_address; /* base address of module */
357 @REPLY
358 size_t size; /* module size */
359 void* entry_point;
360 VARARG(filename,unicode_str); /* file name of module */
361 @END
364 /* Suspend a thread */
365 @REQ(suspend_thread)
366 obj_handle_t handle; /* thread handle */
367 @REPLY
368 int count; /* new suspend count */
369 @END
372 /* Resume a thread */
373 @REQ(resume_thread)
374 obj_handle_t handle; /* thread handle */
375 @REPLY
376 int count; /* new suspend count */
377 @END
380 /* Notify the server that a dll has been loaded */
381 @REQ(load_dll)
382 obj_handle_t handle; /* file handle */
383 void* base; /* base address */
384 size_t size; /* dll size */
385 int dbg_offset; /* debug info offset */
386 int dbg_size; /* debug info size */
387 void* name; /* ptr to ptr to name (in process addr space) */
388 VARARG(filename,unicode_str); /* file name of dll */
389 @END
392 /* Notify the server that a dll is being unloaded */
393 @REQ(unload_dll)
394 void* base; /* base address */
395 @END
398 /* Queue an APC for a thread */
399 @REQ(queue_apc)
400 obj_handle_t handle; /* thread handle */
401 int user; /* user or system apc? */
402 void* func; /* function to call */
403 void* arg1; /* params for function to call */
404 void* arg2;
405 void* arg3;
406 @END
409 /* Get next APC to call */
410 @REQ(get_apc)
411 int alertable; /* is thread alertable? */
412 @REPLY
413 void* func; /* function to call */
414 int type; /* function type */
415 void* arg1; /* function arguments */
416 void* arg2;
417 void* arg3;
418 @END
419 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
422 /* Close a handle for the current process */
423 @REQ(close_handle)
424 obj_handle_t handle; /* handle to close */
425 @REPLY
426 int fd; /* associated fd to close */
427 @END
430 /* Set a handle information */
431 @REQ(set_handle_info)
432 obj_handle_t handle; /* handle we are interested in */
433 int flags; /* new handle flags */
434 int mask; /* mask for flags to set */
435 int fd; /* file descriptor or -1 */
436 @REPLY
437 int old_flags; /* old flag value */
438 int cur_fd; /* current file descriptor */
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 int inherit; /* inherit flag */
449 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 int inherit; /* inherit flag */
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 int inherit; /* inherit flag */
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 abs_time_t timeout; /* absolute timeout */
484 VARARG(handles,handles); /* handles to select on */
485 @END
486 #define SELECT_ALL 1
487 #define SELECT_ALERTABLE 2
488 #define SELECT_INTERRUPTIBLE 4
489 #define SELECT_TIMEOUT 8
492 /* Create an event */
493 @REQ(create_event)
494 unsigned int access; /* wanted access rights */
495 int manual_reset; /* manual reset event */
496 int initial_state; /* initial state of the event */
497 int inherit; /* inherit flag */
498 VARARG(name,unicode_str); /* object name */
499 @REPLY
500 obj_handle_t handle; /* handle to the event */
501 @END
503 /* Event operation */
504 @REQ(event_op)
505 obj_handle_t handle; /* handle to event */
506 int op; /* event operation (see below) */
507 @END
508 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
511 /* Open an event */
512 @REQ(open_event)
513 unsigned int access; /* wanted access rights */
514 int inherit; /* inherit flag */
515 VARARG(name,unicode_str); /* object name */
516 @REPLY
517 obj_handle_t handle; /* handle to the event */
518 @END
521 /* Create a mutex */
522 @REQ(create_mutex)
523 unsigned int access; /* wanted access rights */
524 int owned; /* initially owned? */
525 int inherit; /* inherit flag */
526 VARARG(name,unicode_str); /* object name */
527 @REPLY
528 obj_handle_t handle; /* handle to the mutex */
529 @END
532 /* Release a mutex */
533 @REQ(release_mutex)
534 obj_handle_t handle; /* handle to the mutex */
535 @REPLY
536 unsigned int prev_count; /* value of internal counter, before release */
537 @END
540 /* Open a mutex */
541 @REQ(open_mutex)
542 unsigned int access; /* wanted access rights */
543 int inherit; /* inherit flag */
544 VARARG(name,unicode_str); /* object name */
545 @REPLY
546 obj_handle_t handle; /* handle to the mutex */
547 @END
550 /* Create a semaphore */
551 @REQ(create_semaphore)
552 unsigned int access; /* wanted access rights */
553 unsigned int initial; /* initial count */
554 unsigned int max; /* maximum count */
555 int inherit; /* inherit flag */
556 VARARG(name,unicode_str); /* object name */
557 @REPLY
558 obj_handle_t handle; /* handle to the semaphore */
559 @END
562 /* Release a semaphore */
563 @REQ(release_semaphore)
564 obj_handle_t handle; /* handle to the semaphore */
565 unsigned int count; /* count to add to semaphore */
566 @REPLY
567 unsigned int prev_count; /* previous semaphore count */
568 @END
571 /* Open a semaphore */
572 @REQ(open_semaphore)
573 unsigned int access; /* wanted access rights */
574 int inherit; /* inherit flag */
575 VARARG(name,unicode_str); /* object name */
576 @REPLY
577 obj_handle_t handle; /* handle to the semaphore */
578 @END
581 /* Create a file */
582 @REQ(create_file)
583 unsigned int access; /* wanted access rights */
584 int inherit; /* inherit flag */
585 unsigned int sharing; /* sharing flags */
586 int create; /* file create action */
587 unsigned int options; /* file options */
588 unsigned int attrs; /* file attributes for creation */
589 VARARG(filename,string); /* file name */
590 @REPLY
591 obj_handle_t handle; /* handle to the file */
592 @END
595 /* Allocate a file handle for a Unix fd */
596 @REQ(alloc_file_handle)
597 unsigned int access; /* wanted access rights */
598 int inherit; /* inherit flag */
599 int fd; /* file descriptor on the client side */
600 @REPLY
601 obj_handle_t handle; /* handle to the file */
602 @END
605 /* Get a Unix fd to access a file */
606 @REQ(get_handle_fd)
607 obj_handle_t handle; /* handle to the file */
608 unsigned int access; /* wanted access rights */
609 @REPLY
610 int fd; /* file descriptor */
611 int flags; /* file read/write flags (see below) */
612 @END
613 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
614 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
615 #define FD_FLAG_RECV_SHUTDOWN 0x04
616 #define FD_FLAG_SEND_SHUTDOWN 0x08
617 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
618 * only handle available data (don't wait) */
621 /* Flush a file buffers */
622 @REQ(flush_file)
623 obj_handle_t handle; /* handle to the file */
624 @REPLY
625 obj_handle_t event; /* event set when finished */
626 @END
629 /* Lock a region of a file */
630 @REQ(lock_file)
631 obj_handle_t handle; /* handle to the file */
632 unsigned int offset_low; /* offset of start of lock */
633 unsigned int offset_high; /* offset of start of lock */
634 unsigned int count_low; /* count of bytes to lock */
635 unsigned int count_high; /* count of bytes to lock */
636 int shared; /* shared or exclusive lock? */
637 int wait; /* do we want to wait? */
638 @REPLY
639 obj_handle_t handle; /* handle to wait on */
640 int overlapped; /* is it an overlapped I/O handle? */
641 @END
644 /* Unlock a region of a file */
645 @REQ(unlock_file)
646 obj_handle_t handle; /* handle to the file */
647 unsigned int offset_low; /* offset of start of unlock */
648 unsigned int offset_high; /* offset of start of unlock */
649 unsigned int count_low; /* count of bytes to unlock */
650 unsigned int count_high; /* count of bytes to unlock */
651 @END
654 /* Create a socket */
655 @REQ(create_socket)
656 unsigned int access; /* wanted access rights */
657 int inherit; /* inherit flag */
658 int family; /* family, see socket manpage */
659 int type; /* type, see socket manpage */
660 int protocol; /* protocol, see socket manpage */
661 unsigned int flags; /* socket flags */
662 @REPLY
663 obj_handle_t handle; /* handle to the new socket */
664 @END
667 /* Accept a socket */
668 @REQ(accept_socket)
669 obj_handle_t lhandle; /* handle to the listening socket */
670 unsigned int access; /* wanted access rights */
671 int inherit; /* inherit flag */
672 @REPLY
673 obj_handle_t handle; /* handle to the new socket */
674 @END
677 /* Set socket event parameters */
678 @REQ(set_socket_event)
679 obj_handle_t handle; /* handle to the socket */
680 unsigned int mask; /* event mask */
681 obj_handle_t event; /* event object */
682 user_handle_t window; /* window to send the message to */
683 unsigned int msg; /* message to send */
684 @END
687 /* Get socket event parameters */
688 @REQ(get_socket_event)
689 obj_handle_t handle; /* handle to the socket */
690 int service; /* clear pending? */
691 obj_handle_t c_event; /* event to clear */
692 @REPLY
693 unsigned int mask; /* event mask */
694 unsigned int pmask; /* pending events */
695 unsigned int state; /* status bits */
696 VARARG(errors,ints); /* event errors */
697 @END
700 /* Reenable pending socket events */
701 @REQ(enable_socket_event)
702 obj_handle_t handle; /* handle to the socket */
703 unsigned int mask; /* events to re-enable */
704 unsigned int sstate; /* status bits to set */
705 unsigned int cstate; /* status bits to clear */
706 @END
708 @REQ(set_socket_deferred)
709 obj_handle_t handle; /* handle to the socket */
710 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
711 @END
713 /* Allocate a console (only used by a console renderer) */
714 @REQ(alloc_console)
715 unsigned int access; /* wanted access rights */
716 int inherit; /* inherit flag */
717 process_id_t pid; /* pid of process which shall be attached to the console */
718 @REPLY
719 obj_handle_t handle_in; /* handle to console input */
720 obj_handle_t event; /* handle to renderer events change notification */
721 @END
724 /* Free the console of the current process */
725 @REQ(free_console)
726 @END
729 #define CONSOLE_RENDERER_NONE_EVENT 0x00
730 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
731 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
732 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
733 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
734 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
735 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
736 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
737 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
738 struct console_renderer_event
740 short event;
741 union
743 struct update
745 short top;
746 short bottom;
747 } update;
748 struct resize
750 short width;
751 short height;
752 } resize;
753 struct cursor_pos
755 short x;
756 short y;
757 } cursor_pos;
758 struct cursor_geom
760 short visible;
761 short size;
762 } cursor_geom;
763 struct display
765 short left;
766 short top;
767 short width;
768 short height;
769 } display;
770 } u;
773 /* retrieve console events for the renderer */
774 @REQ(get_console_renderer_events)
775 obj_handle_t handle; /* handle to console input events */
776 @REPLY
777 VARARG(data,bytes); /* the various console_renderer_events */
778 @END
781 /* Open a handle to the process console */
782 @REQ(open_console)
783 int from; /* 0 (resp 1) input (resp output) of current process console */
784 /* otherwise console_in handle to get active screen buffer? */
785 unsigned int access; /* wanted access rights */
786 int inherit; /* inherit flag */
787 int share; /* share mask (only for output handles) */
788 @REPLY
789 obj_handle_t handle; /* handle to the console */
790 @END
793 /* Get the input queue wait event */
794 @REQ(get_console_wait_event)
795 @REPLY
796 obj_handle_t handle;
797 @END
799 /* Get a console mode (input or output) */
800 @REQ(get_console_mode)
801 obj_handle_t handle; /* handle to the console */
802 @REPLY
803 int mode; /* console mode */
804 @END
807 /* Set a console mode (input or output) */
808 @REQ(set_console_mode)
809 obj_handle_t handle; /* handle to the console */
810 int mode; /* console mode */
811 @END
814 /* Set info about a console (input only) */
815 @REQ(set_console_input_info)
816 obj_handle_t handle; /* handle to console input, or 0 for process' console */
817 int mask; /* setting mask (see below) */
818 obj_handle_t active_sb; /* active screen buffer */
819 int history_mode; /* whether we duplicate lines in history */
820 int history_size; /* number of lines in history */
821 int edition_mode; /* index to the edition mode flavors */
822 VARARG(title,unicode_str); /* console title */
823 @END
824 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
825 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
826 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
827 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
828 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
831 /* Get info about a console (input only) */
832 @REQ(get_console_input_info)
833 obj_handle_t handle; /* handle to console input, or 0 for process' console */
834 @REPLY
835 int history_mode; /* whether we duplicate lines in history */
836 int history_size; /* number of lines in history */
837 int history_index; /* number of used lines in history */
838 int edition_mode; /* index to the edition mode flavors */
839 VARARG(title,unicode_str); /* console title */
840 @END
843 /* appends a string to console's history */
844 @REQ(append_console_input_history)
845 obj_handle_t handle; /* handle to console input, or 0 for process' console */
846 VARARG(line,unicode_str); /* line to add */
847 @END
850 /* appends a string to console's history */
851 @REQ(get_console_input_history)
852 obj_handle_t handle; /* handle to console input, or 0 for process' console */
853 int index; /* index to get line from */
854 @REPLY
855 int total; /* total length of line in Unicode chars */
856 VARARG(line,unicode_str); /* line to add */
857 @END
860 /* creates a new screen buffer on process' console */
861 @REQ(create_console_output)
862 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
863 int access; /* wanted access rights */
864 int share; /* sharing credentials */
865 int inherit; /* inherit flag */
866 @REPLY
867 obj_handle_t handle_out; /* handle to the screen buffer */
868 @END
871 /* Set info about a console (output only) */
872 @REQ(set_console_output_info)
873 obj_handle_t handle; /* handle to the console */
874 int mask; /* setting mask (see below) */
875 short int cursor_size; /* size of cursor (percentage filled) */
876 short int cursor_visible;/* cursor visibility flag */
877 short int cursor_x; /* position of cursor (x, y) */
878 short int cursor_y;
879 short int width; /* width of the screen buffer */
880 short int height; /* height of the screen buffer */
881 short int attr; /* default attribute */
882 short int win_left; /* window actually displayed by renderer */
883 short int win_top; /* the rect area is expressed withing the */
884 short int win_right; /* boundaries of the screen buffer */
885 short int win_bottom;
886 short int max_width; /* maximum size (width x height) for the window */
887 short int max_height;
888 @END
889 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
890 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
891 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
892 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
893 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
894 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
897 /* Get info about a console (output only) */
898 @REQ(get_console_output_info)
899 obj_handle_t handle; /* handle to the console */
900 @REPLY
901 short int cursor_size; /* size of cursor (percentage filled) */
902 short int cursor_visible;/* cursor visibility flag */
903 short int cursor_x; /* position of cursor (x, y) */
904 short int cursor_y;
905 short int width; /* width of the screen buffer */
906 short int height; /* height of the screen buffer */
907 short int attr; /* default attribute */
908 short int win_left; /* window actually displayed by renderer */
909 short int win_top; /* the rect area is expressed withing the */
910 short int win_right; /* boundaries of the screen buffer */
911 short int win_bottom;
912 short int max_width; /* maximum size (width x height) for the window */
913 short int max_height;
914 @END
916 /* Add input records to a console input queue */
917 @REQ(write_console_input)
918 obj_handle_t handle; /* handle to the console input */
919 VARARG(rec,input_records); /* input records */
920 @REPLY
921 int written; /* number of records written */
922 @END
925 /* Fetch input records from a console input queue */
926 @REQ(read_console_input)
927 obj_handle_t handle; /* handle to the console input */
928 int flush; /* flush the retrieved records from the queue? */
929 @REPLY
930 int read; /* number of records read */
931 VARARG(rec,input_records); /* input records */
932 @END
935 /* write data (chars and/or attributes) in a screen buffer */
936 @REQ(write_console_output)
937 obj_handle_t handle; /* handle to the console output */
938 int x; /* position where to start writing */
939 int y;
940 int mode; /* char info (see below) */
941 int wrap; /* wrap around at end of line? */
942 VARARG(data,bytes); /* info to write */
943 @REPLY
944 int written; /* number of char infos actually written */
945 int width; /* width of screen buffer */
946 int height; /* height of screen buffer */
947 @END
948 enum char_info_mode
950 CHAR_INFO_MODE_TEXT, /* characters only */
951 CHAR_INFO_MODE_ATTR, /* attributes only */
952 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
953 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
957 /* fill a screen buffer with constant data (chars and/or attributes) */
958 @REQ(fill_console_output)
959 obj_handle_t handle; /* handle to the console output */
960 int x; /* position where to start writing */
961 int y;
962 int mode; /* char info mode */
963 int count; /* number to write */
964 int wrap; /* wrap around at end of line? */
965 char_info_t data; /* data to write */
966 @REPLY
967 int written; /* number of char infos actually written */
968 @END
971 /* read data (chars and/or attributes) from a screen buffer */
972 @REQ(read_console_output)
973 obj_handle_t handle; /* handle to the console output */
974 int x; /* position (x,y) where to start reading */
975 int y;
976 int mode; /* char info mode */
977 int wrap; /* wrap around at end of line? */
978 @REPLY
979 int width; /* width of screen buffer */
980 int height; /* height of screen buffer */
981 VARARG(data,bytes);
982 @END
985 /* move a rect (of data) in screen buffer content */
986 @REQ(move_console_output)
987 obj_handle_t handle; /* handle to the console output */
988 short int x_src; /* position (x, y) of rect to start moving from */
989 short int y_src;
990 short int x_dst; /* position (x, y) of rect to move to */
991 short int y_dst;
992 short int w; /* size of the rect (width, height) to move */
993 short int h;
994 @END
997 /* Sends a signal to a process group */
998 @REQ(send_console_signal)
999 int signal; /* the signal to send */
1000 process_id_t group_id; /* the group to send the signal to */
1001 @END
1004 /* Create a change notification */
1005 @REQ(create_change_notification)
1006 obj_handle_t handle; /* handle to the directory */
1007 int subtree; /* watch all the subtree */
1008 unsigned int filter; /* notification filter */
1009 @REPLY
1010 obj_handle_t handle; /* handle to the change notification */
1011 @END
1014 /* Move to the next change notification */
1015 @REQ(next_change_notification)
1016 obj_handle_t handle; /* handle to the change notification */
1017 @END
1019 /* Create a file mapping */
1020 @REQ(create_mapping)
1021 int size_high; /* mapping size */
1022 int size_low; /* mapping size */
1023 int protect; /* protection flags (see below) */
1024 unsigned int access; /* wanted access rights */
1025 int inherit; /* inherit flag */
1026 obj_handle_t file_handle; /* file handle */
1027 VARARG(name,unicode_str); /* object name */
1028 @REPLY
1029 obj_handle_t handle; /* handle to the mapping */
1030 @END
1031 /* protection flags */
1032 #define VPROT_READ 0x01
1033 #define VPROT_WRITE 0x02
1034 #define VPROT_EXEC 0x04
1035 #define VPROT_WRITECOPY 0x08
1036 #define VPROT_GUARD 0x10
1037 #define VPROT_NOCACHE 0x20
1038 #define VPROT_COMMITTED 0x40
1039 #define VPROT_IMAGE 0x80
1042 /* Open a mapping */
1043 @REQ(open_mapping)
1044 unsigned int access; /* wanted access rights */
1045 int inherit; /* inherit flag */
1046 VARARG(name,unicode_str); /* object name */
1047 @REPLY
1048 obj_handle_t handle; /* handle to the mapping */
1049 @END
1052 /* Get information about a file mapping */
1053 @REQ(get_mapping_info)
1054 obj_handle_t handle; /* handle to the mapping */
1055 @REPLY
1056 int size_high; /* mapping size */
1057 int size_low; /* mapping size */
1058 int protect; /* protection flags */
1059 int header_size; /* header size (for VPROT_IMAGE mapping) */
1060 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1061 obj_handle_t shared_file; /* shared mapping file handle */
1062 int shared_size; /* shared mapping size */
1063 @END
1066 #define SNAP_HEAPLIST 0x00000001
1067 #define SNAP_PROCESS 0x00000002
1068 #define SNAP_THREAD 0x00000004
1069 #define SNAP_MODULE 0x00000008
1070 /* Create a snapshot */
1071 @REQ(create_snapshot)
1072 int inherit; /* inherit flag */
1073 int flags; /* snapshot flags (SNAP_*) */
1074 process_id_t pid; /* process id */
1075 @REPLY
1076 obj_handle_t handle; /* handle to the snapshot */
1077 @END
1080 /* Get the next process from a snapshot */
1081 @REQ(next_process)
1082 obj_handle_t handle; /* handle to the snapshot */
1083 int reset; /* reset snapshot position? */
1084 @REPLY
1085 int count; /* process usage count */
1086 process_id_t pid; /* process id */
1087 process_id_t ppid; /* parent process id */
1088 void* heap; /* heap base */
1089 void* module; /* main module */
1090 int threads; /* number of threads */
1091 int priority; /* process priority */
1092 int handles; /* number of handles */
1093 VARARG(filename,unicode_str); /* file name of main exe */
1094 @END
1097 /* Get the next thread from a snapshot */
1098 @REQ(next_thread)
1099 obj_handle_t handle; /* handle to the snapshot */
1100 int reset; /* reset snapshot position? */
1101 @REPLY
1102 int count; /* thread usage count */
1103 process_id_t pid; /* process id */
1104 thread_id_t tid; /* thread id */
1105 int base_pri; /* base priority */
1106 int delta_pri; /* delta priority */
1107 @END
1110 /* Get the next module from a snapshot */
1111 @REQ(next_module)
1112 obj_handle_t handle; /* handle to the snapshot */
1113 int reset; /* reset snapshot position? */
1114 @REPLY
1115 process_id_t pid; /* process id */
1116 void* base; /* module base address */
1117 size_t size; /* module size */
1118 VARARG(filename,unicode_str); /* file name of module */
1119 @END
1122 /* Wait for a debug event */
1123 @REQ(wait_debug_event)
1124 int get_handle; /* should we alloc a handle for waiting? */
1125 @REPLY
1126 process_id_t pid; /* process id */
1127 thread_id_t tid; /* thread id */
1128 obj_handle_t wait; /* wait handle if no event ready */
1129 VARARG(event,debug_event); /* debug event data */
1130 @END
1133 /* Queue an exception event */
1134 @REQ(queue_exception_event)
1135 int first; /* first chance exception? */
1136 VARARG(record,exc_event); /* thread context followed by exception record */
1137 @REPLY
1138 obj_handle_t handle; /* handle to the queued event */
1139 @END
1142 /* Retrieve the status of an exception event */
1143 @REQ(get_exception_status)
1144 obj_handle_t handle; /* handle to the queued event */
1145 @REPLY
1146 int status; /* event continuation status */
1147 VARARG(context,context); /* modified thread context */
1148 @END
1151 /* Send an output string to the debugger */
1152 @REQ(output_debug_string)
1153 void* string; /* string to display (in debugged process address space) */
1154 int unicode; /* is it Unicode? */
1155 int length; /* string length */
1156 @END
1159 /* Continue a debug event */
1160 @REQ(continue_debug_event)
1161 process_id_t pid; /* process id to continue */
1162 thread_id_t tid; /* thread id to continue */
1163 int status; /* continuation status */
1164 @END
1167 /* Start/stop debugging an existing process */
1168 @REQ(debug_process)
1169 process_id_t pid; /* id of the process to debug */
1170 int attach; /* 1=attaching / 0=detaching from the process */
1171 @END
1174 /* Simulate a breakpoint in a process */
1175 @REQ(debug_break)
1176 obj_handle_t handle; /* process handle */
1177 @REPLY
1178 int self; /* was it the caller itself? */
1179 @END
1182 /* Set debugger kill on exit flag */
1183 @REQ(set_debugger_kill_on_exit)
1184 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1185 @END
1188 /* Read data from a process address space */
1189 @REQ(read_process_memory)
1190 obj_handle_t handle; /* process handle */
1191 void* addr; /* addr to read from */
1192 @REPLY
1193 VARARG(data,bytes); /* result data */
1194 @END
1197 /* Write data to a process address space */
1198 @REQ(write_process_memory)
1199 obj_handle_t handle; /* process handle */
1200 void* addr; /* addr to write to (must be int-aligned) */
1201 unsigned int first_mask; /* mask for first word */
1202 unsigned int last_mask; /* mask for last word */
1203 VARARG(data,bytes); /* data to write */
1204 @END
1207 /* Create a registry key */
1208 @REQ(create_key)
1209 obj_handle_t parent; /* handle to the parent key */
1210 unsigned int access; /* desired access rights */
1211 unsigned int options; /* creation options */
1212 time_t modif; /* last modification time */
1213 size_t namelen; /* length of key name in bytes */
1214 VARARG(name,unicode_str,namelen); /* key name */
1215 VARARG(class,unicode_str); /* class name */
1216 @REPLY
1217 obj_handle_t hkey; /* handle to the created key */
1218 int created; /* has it been newly created? */
1219 @END
1221 /* Open a registry key */
1222 @REQ(open_key)
1223 obj_handle_t parent; /* handle to the parent key */
1224 unsigned int access; /* desired access rights */
1225 VARARG(name,unicode_str); /* key name */
1226 @REPLY
1227 obj_handle_t hkey; /* handle to the open key */
1228 @END
1231 /* Delete a registry key */
1232 @REQ(delete_key)
1233 obj_handle_t hkey; /* handle to the key */
1234 @END
1237 /* Flush a registry key */
1238 @REQ(flush_key)
1239 obj_handle_t hkey; /* handle to the key */
1240 @END
1243 /* Enumerate registry subkeys */
1244 @REQ(enum_key)
1245 obj_handle_t hkey; /* handle to registry key */
1246 int index; /* index of subkey (or -1 for current key) */
1247 int info_class; /* requested information class */
1248 @REPLY
1249 int subkeys; /* number of subkeys */
1250 int max_subkey; /* longest subkey name */
1251 int max_class; /* longest class name */
1252 int values; /* number of values */
1253 int max_value; /* longest value name */
1254 int max_data; /* longest value data */
1255 time_t modif; /* last modification time */
1256 size_t total; /* total length needed for full name and class */
1257 size_t namelen; /* length of key name in bytes */
1258 VARARG(name,unicode_str,namelen); /* key name */
1259 VARARG(class,unicode_str); /* class name */
1260 @END
1263 /* Set a value of a registry key */
1264 @REQ(set_key_value)
1265 obj_handle_t hkey; /* handle to registry key */
1266 int type; /* value type */
1267 size_t namelen; /* length of value name in bytes */
1268 VARARG(name,unicode_str,namelen); /* value name */
1269 VARARG(data,bytes); /* value data */
1270 @END
1273 /* Retrieve the value of a registry key */
1274 @REQ(get_key_value)
1275 obj_handle_t hkey; /* handle to registry key */
1276 VARARG(name,unicode_str); /* value name */
1277 @REPLY
1278 int type; /* value type */
1279 size_t total; /* total length needed for data */
1280 VARARG(data,bytes); /* value data */
1281 @END
1284 /* Enumerate a value of a registry key */
1285 @REQ(enum_key_value)
1286 obj_handle_t hkey; /* handle to registry key */
1287 int index; /* value index */
1288 int info_class; /* requested information class */
1289 @REPLY
1290 int type; /* value type */
1291 size_t total; /* total length needed for full name and data */
1292 size_t namelen; /* length of value name in bytes */
1293 VARARG(name,unicode_str,namelen); /* value name */
1294 VARARG(data,bytes); /* value data */
1295 @END
1298 /* Delete a value of a registry key */
1299 @REQ(delete_key_value)
1300 obj_handle_t hkey; /* handle to registry key */
1301 VARARG(name,unicode_str); /* value name */
1302 @END
1305 /* Load a registry branch from a file */
1306 @REQ(load_registry)
1307 obj_handle_t hkey; /* root key to load to */
1308 obj_handle_t file; /* file to load from */
1309 VARARG(name,unicode_str); /* subkey name */
1310 @END
1313 /* UnLoad a registry branch from a file */
1314 @REQ(unload_registry)
1315 obj_handle_t hkey; /* root key to unload to */
1316 @END
1319 /* Save a registry branch to a file */
1320 @REQ(save_registry)
1321 obj_handle_t hkey; /* key to save */
1322 obj_handle_t file; /* file to save to */
1323 @END
1326 /* Load the user registry files */
1327 @REQ(load_user_registries)
1328 obj_handle_t hkey; /* key for HKCU */
1329 int saving; /* new saving level */
1330 int period; /* duration between periodic saves (milliseconds) */
1331 @END
1334 /* Add a registry key change notification */
1335 @REQ(set_registry_notification)
1336 obj_handle_t hkey; /* key to watch for changes */
1337 obj_handle_t event; /* event to set */
1338 int subtree; /* should we watch the whole subtree? */
1339 unsigned int filter; /* things to watch */
1340 @END
1343 /* Create a waitable timer */
1344 @REQ(create_timer)
1345 unsigned int access; /* wanted access rights */
1346 int inherit; /* inherit flag */
1347 int manual; /* manual reset */
1348 VARARG(name,unicode_str); /* object name */
1349 @REPLY
1350 obj_handle_t handle; /* handle to the timer */
1351 @END
1354 /* Open a waitable timer */
1355 @REQ(open_timer)
1356 unsigned int access; /* wanted access rights */
1357 int inherit; /* inherit flag */
1358 VARARG(name,unicode_str); /* object name */
1359 @REPLY
1360 obj_handle_t handle; /* handle to the timer */
1361 @END
1363 /* Set a waitable timer */
1364 @REQ(set_timer)
1365 obj_handle_t handle; /* handle to the timer */
1366 abs_time_t expire; /* next expiration absolute time */
1367 int period; /* timer period in ms */
1368 void* callback; /* callback function */
1369 void* arg; /* callback argument */
1370 @REPLY
1371 int signaled; /* was the timer signaled before this call ? */
1372 @END
1374 /* Cancel a waitable timer */
1375 @REQ(cancel_timer)
1376 obj_handle_t handle; /* handle to the timer */
1377 @REPLY
1378 int signaled; /* was the timer signaled before this calltime ? */
1379 @END
1381 /* Get information on a waitable timer */
1382 @REQ(get_timer_info)
1383 obj_handle_t handle; /* handle to the timer */
1384 @REPLY
1385 abs_time_t when; /* absolute time when the timer next expires */
1386 int signaled; /* is the timer signaled? */
1387 @END
1390 /* Retrieve the current context of a thread */
1391 @REQ(get_thread_context)
1392 obj_handle_t handle; /* thread handle */
1393 unsigned int flags; /* context flags */
1394 @REPLY
1395 VARARG(context,context); /* thread context */
1396 @END
1399 /* Set the current context of a thread */
1400 @REQ(set_thread_context)
1401 obj_handle_t handle; /* thread handle */
1402 unsigned int flags; /* context flags */
1403 VARARG(context,context); /* thread context */
1404 @END
1407 /* Fetch a selector entry for a thread */
1408 @REQ(get_selector_entry)
1409 obj_handle_t handle; /* thread handle */
1410 int entry; /* LDT entry */
1411 @REPLY
1412 unsigned int base; /* selector base */
1413 unsigned int limit; /* selector limit */
1414 unsigned char flags; /* selector flags */
1415 @END
1418 /* Add an atom */
1419 @REQ(add_atom)
1420 int local; /* is atom in local process table? */
1421 VARARG(name,unicode_str); /* atom name */
1422 @REPLY
1423 atom_t atom; /* resulting atom */
1424 @END
1427 /* Delete an atom */
1428 @REQ(delete_atom)
1429 atom_t atom; /* atom handle */
1430 int local; /* is atom in local process table? */
1431 @END
1434 /* Find an atom */
1435 @REQ(find_atom)
1436 int local; /* is atom in local process table? */
1437 VARARG(name,unicode_str); /* atom name */
1438 @REPLY
1439 atom_t atom; /* atom handle */
1440 @END
1443 /* Get an atom name */
1444 @REQ(get_atom_name)
1445 atom_t atom; /* atom handle */
1446 int local; /* is atom in local process table? */
1447 @REPLY
1448 int count; /* atom lock count */
1449 VARARG(name,unicode_str); /* atom name */
1450 @END
1453 /* Init the process atom table */
1454 @REQ(init_atom_table)
1455 int entries; /* number of entries */
1456 @END
1459 /* Get the message queue of the current thread */
1460 @REQ(get_msg_queue)
1461 @REPLY
1462 obj_handle_t handle; /* handle to the queue */
1463 @END
1466 /* Set the current message queue wakeup mask */
1467 @REQ(set_queue_mask)
1468 unsigned int wake_mask; /* wakeup bits mask */
1469 unsigned int changed_mask; /* changed bits mask */
1470 int skip_wait; /* will we skip waiting if signaled? */
1471 @REPLY
1472 unsigned int wake_bits; /* current wake bits */
1473 unsigned int changed_bits; /* current changed bits */
1474 @END
1477 /* Get the current message queue status */
1478 @REQ(get_queue_status)
1479 int clear; /* should we clear the change bits? */
1480 @REPLY
1481 unsigned int wake_bits; /* wake bits */
1482 unsigned int changed_bits; /* changed bits since last time */
1483 @END
1486 /* Wait for a process to start waiting on input */
1487 @REQ(wait_input_idle)
1488 obj_handle_t handle; /* process handle */
1489 int timeout; /* timeout */
1490 @REPLY
1491 obj_handle_t event; /* handle to idle event */
1492 @END
1495 /* Send a message to a thread queue */
1496 @REQ(send_message)
1497 thread_id_t id; /* thread id */
1498 int type; /* message type (see below) */
1499 int flags; /* message flags (see below) */
1500 user_handle_t win; /* window handle */
1501 unsigned int msg; /* message code */
1502 unsigned int wparam; /* parameters */
1503 unsigned int lparam; /* parameters */
1504 int x; /* x position */
1505 int y; /* y position */
1506 unsigned int time; /* message time */
1507 unsigned int info; /* extra info */
1508 int timeout; /* timeout for reply */
1509 void* callback; /* callback address */
1510 VARARG(data,bytes); /* message data for sent messages */
1511 @END
1513 enum message_type
1515 MSG_ASCII, /* Ascii message (from SendMessageA) */
1516 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1517 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1518 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1519 MSG_CALLBACK_RESULT,/* result of a callback message */
1520 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1521 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1522 MSG_HARDWARE, /* hardware message */
1523 MSG_WINEVENT /* winevent message */
1525 #define SEND_MSG_ABORT_IF_HUNG 0x01
1528 /* Get a message from the current queue */
1529 @REQ(get_message)
1530 int flags; /* see below */
1531 user_handle_t get_win; /* window handle to get */
1532 unsigned int get_first; /* first message code to get */
1533 unsigned int get_last; /* last message code to get */
1534 int get_next_hw; /* do we want the get the next hardware msg? */
1535 @REPLY
1536 int type; /* message type */
1537 user_handle_t win; /* window handle */
1538 unsigned int msg; /* message code */
1539 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1540 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1541 int x; /* x position */
1542 int y; /* y position */
1543 user_handle_t hook; /* winevent hook handle */
1544 void* hook_proc; /* winevent hook proc address */
1545 unsigned int time; /* message time */
1546 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1547 size_t total; /* total size of extra data */
1548 VARARG(data,bytes); /* message data for sent messages */
1549 @END
1550 #define GET_MSG_REMOVE 1 /* remove the message */
1551 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1553 /* Reply to a sent message */
1554 @REQ(reply_message)
1555 unsigned int result; /* message result */
1556 int remove; /* should we remove the message? */
1557 VARARG(data,bytes); /* message data for sent messages */
1558 @END
1561 /* Accept the current hardware message */
1562 @REQ(accept_hardware_message)
1563 int remove; /* should we remove the message? */
1564 user_handle_t new_win; /* new destination window for current message */
1565 @END
1568 /* Retrieve the reply for the last message sent */
1569 @REQ(get_message_reply)
1570 int cancel; /* cancel message if not ready? */
1571 @REPLY
1572 unsigned int result; /* message result */
1573 VARARG(data,bytes); /* message data for sent messages */
1574 @END
1577 /* Set a window timer */
1578 @REQ(set_win_timer)
1579 user_handle_t win; /* window handle */
1580 unsigned int msg; /* message to post */
1581 unsigned int id; /* timer id */
1582 unsigned int rate; /* timer rate in ms */
1583 unsigned int lparam; /* message lparam (callback proc) */
1584 @REPLY
1585 unsigned int id; /* timer id */
1586 @END
1589 /* Kill a window timer */
1590 @REQ(kill_win_timer)
1591 user_handle_t win; /* window handle */
1592 unsigned int msg; /* message to post */
1593 unsigned int id; /* timer id */
1594 @END
1597 /* Retrieve info about a serial port */
1598 @REQ(get_serial_info)
1599 obj_handle_t handle; /* handle to comm port */
1600 @REPLY
1601 unsigned int readinterval;
1602 unsigned int readconst;
1603 unsigned int readmult;
1604 unsigned int writeconst;
1605 unsigned int writemult;
1606 unsigned int eventmask;
1607 unsigned int commerror;
1608 @END
1611 /* Set info about a serial port */
1612 @REQ(set_serial_info)
1613 obj_handle_t handle; /* handle to comm port */
1614 int flags; /* bitmask to set values (see below) */
1615 unsigned int readinterval;
1616 unsigned int readconst;
1617 unsigned int readmult;
1618 unsigned int writeconst;
1619 unsigned int writemult;
1620 unsigned int eventmask;
1621 unsigned int commerror;
1622 @END
1623 #define SERIALINFO_SET_TIMEOUTS 0x01
1624 #define SERIALINFO_SET_MASK 0x02
1625 #define SERIALINFO_SET_ERROR 0x04
1628 /* Create an async I/O */
1629 @REQ(register_async)
1630 obj_handle_t handle; /* handle to comm port, socket or file */
1631 int type; /* type of queue to look after */
1632 void* io_apc; /* APC routine to queue upon end of async */
1633 void* io_sb; /* I/O status block (unique across all async on this handle) */
1634 void* io_user; /* data to pass back to caller */
1635 int count; /* count - usually # of bytes to be read/written */
1636 @END
1637 #define ASYNC_TYPE_READ 0x01
1638 #define ASYNC_TYPE_WRITE 0x02
1639 #define ASYNC_TYPE_WAIT 0x03
1642 /* Cancel all async op on a fd */
1643 @REQ(cancel_async)
1644 obj_handle_t handle; /* handle to comm port, socket or file */
1645 @END
1648 /* Create a named pipe */
1649 @REQ(create_named_pipe)
1650 unsigned int openmode;
1651 unsigned int pipemode;
1652 unsigned int maxinstances;
1653 unsigned int outsize;
1654 unsigned int insize;
1655 unsigned int timeout;
1656 int inherit; /* inherit flag */
1657 VARARG(name,unicode_str); /* pipe name */
1658 @REPLY
1659 obj_handle_t handle; /* handle to the pipe */
1660 @END
1663 /* Open an existing named pipe */
1664 @REQ(open_named_pipe)
1665 unsigned int access;
1666 int inherit; /* inherit flag */
1667 VARARG(name,unicode_str); /* pipe name */
1668 @REPLY
1669 obj_handle_t handle; /* handle to the pipe */
1670 @END
1673 /* Connect to a named pipe */
1674 @REQ(connect_named_pipe)
1675 obj_handle_t handle;
1676 void* overlapped;
1677 void* func;
1678 @END
1681 /* Wait for a named pipe */
1682 @REQ(wait_named_pipe)
1683 unsigned int timeout;
1684 void* overlapped;
1685 void* func;
1686 VARARG(name,unicode_str); /* pipe name */
1687 @END
1690 /* Disconnect a named pipe */
1691 @REQ(disconnect_named_pipe)
1692 obj_handle_t handle;
1693 @REPLY
1694 int fd; /* associated fd to close */
1695 @END
1698 @REQ(get_named_pipe_info)
1699 obj_handle_t handle;
1700 @REPLY
1701 unsigned int flags;
1702 unsigned int maxinstances;
1703 unsigned int outsize;
1704 unsigned int insize;
1705 @END
1708 /* Create a window */
1709 @REQ(create_window)
1710 user_handle_t parent; /* parent window */
1711 user_handle_t owner; /* owner window */
1712 atom_t atom; /* class atom */
1713 void* instance; /* module instance */
1714 @REPLY
1715 user_handle_t handle; /* created window */
1716 int extra; /* number of extra bytes */
1717 void* class_ptr; /* pointer to class in client address space */
1718 @END
1721 /* Link a window into the tree */
1722 @REQ(link_window)
1723 user_handle_t handle; /* handle to the window */
1724 user_handle_t parent; /* handle to the parent */
1725 user_handle_t previous; /* previous child in Z-order */
1726 @REPLY
1727 user_handle_t full_parent; /* full handle of new parent */
1728 @END
1731 /* Destroy a window */
1732 @REQ(destroy_window)
1733 user_handle_t handle; /* handle to the window */
1734 @END
1737 /* Set a window owner */
1738 @REQ(set_window_owner)
1739 user_handle_t handle; /* handle to the window */
1740 user_handle_t owner; /* new owner */
1741 @REPLY
1742 user_handle_t full_owner; /* full handle of new owner */
1743 user_handle_t prev_owner; /* full handle of previous owner */
1744 @END
1747 /* Get information from a window handle */
1748 @REQ(get_window_info)
1749 user_handle_t handle; /* handle to the window */
1750 @REPLY
1751 user_handle_t full_handle; /* full 32-bit handle */
1752 user_handle_t last_active; /* last active popup */
1753 process_id_t pid; /* process owning the window */
1754 thread_id_t tid; /* thread owning the window */
1755 atom_t atom; /* class atom */
1756 @END
1759 /* Set some information in a window */
1760 @REQ(set_window_info)
1761 user_handle_t handle; /* handle to the window */
1762 unsigned int flags; /* flags for fields to set (see below) */
1763 unsigned int style; /* window style */
1764 unsigned int ex_style; /* window extended style */
1765 unsigned int id; /* window id */
1766 void* instance; /* creator instance */
1767 void* user_data; /* user-specific data */
1768 int extra_offset; /* offset to set in extra bytes */
1769 size_t extra_size; /* size to set in extra bytes */
1770 unsigned int extra_value; /* value to set in extra bytes */
1771 @REPLY
1772 unsigned int old_style; /* old window style */
1773 unsigned int old_ex_style; /* old window extended style */
1774 unsigned int old_id; /* old window id */
1775 void* old_instance; /* old creator instance */
1776 void* old_user_data; /* old user-specific data */
1777 unsigned int old_extra_value; /* old value in extra bytes */
1778 @END
1779 #define SET_WIN_STYLE 0x01
1780 #define SET_WIN_EXSTYLE 0x02
1781 #define SET_WIN_ID 0x04
1782 #define SET_WIN_INSTANCE 0x08
1783 #define SET_WIN_USERDATA 0x10
1784 #define SET_WIN_EXTRA 0x20
1787 /* Get a list of the window parents, up to the root of the tree */
1788 @REQ(get_window_parents)
1789 user_handle_t handle; /* handle to the window */
1790 @REPLY
1791 int count; /* total count of parents */
1792 VARARG(parents,user_handles); /* parent handles */
1793 @END
1796 /* Get a list of the window children */
1797 @REQ(get_window_children)
1798 user_handle_t parent; /* parent window */
1799 atom_t atom; /* class atom for the listed children */
1800 thread_id_t tid; /* thread owning the listed children */
1801 @REPLY
1802 int count; /* total count of children */
1803 VARARG(children,user_handles); /* children handles */
1804 @END
1807 /* Get a list of the window children that contain a given point */
1808 @REQ(get_window_children_from_point)
1809 user_handle_t parent; /* parent window */
1810 int x; /* point in parent coordinates */
1811 int y;
1812 @REPLY
1813 int count; /* total count of children */
1814 VARARG(children,user_handles); /* children handles */
1815 @END
1818 /* Get window tree information from a window handle */
1819 @REQ(get_window_tree)
1820 user_handle_t handle; /* handle to the window */
1821 @REPLY
1822 user_handle_t parent; /* parent window */
1823 user_handle_t owner; /* owner window */
1824 user_handle_t next_sibling; /* next sibling in Z-order */
1825 user_handle_t prev_sibling; /* prev sibling in Z-order */
1826 user_handle_t first_sibling; /* first sibling in Z-order */
1827 user_handle_t last_sibling; /* last sibling in Z-order */
1828 user_handle_t first_child; /* first child */
1829 user_handle_t last_child; /* last child */
1830 @END
1832 /* Set the position and Z order of a window */
1833 @REQ(set_window_pos)
1834 user_handle_t handle; /* handle to the window */
1835 user_handle_t previous; /* previous window in Z order */
1836 unsigned int flags; /* SWP_* flags */
1837 rectangle_t window; /* window rectangle */
1838 rectangle_t client; /* client rectangle */
1839 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1840 @REPLY
1841 unsigned int new_style; /* new window style */
1842 @END
1845 /* Get the window and client rectangles of a window */
1846 @REQ(get_window_rectangles)
1847 user_handle_t handle; /* handle to the window */
1848 @REPLY
1849 rectangle_t window; /* window rectangle */
1850 rectangle_t visible; /* visible part of the window rectangle */
1851 rectangle_t client; /* client rectangle */
1852 @END
1855 /* Get the window text */
1856 @REQ(get_window_text)
1857 user_handle_t handle; /* handle to the window */
1858 @REPLY
1859 VARARG(text,unicode_str); /* window text */
1860 @END
1863 /* Set the window text */
1864 @REQ(set_window_text)
1865 user_handle_t handle; /* handle to the window */
1866 VARARG(text,unicode_str); /* window text */
1867 @END
1870 /* Get the coordinates offset between two windows */
1871 @REQ(get_windows_offset)
1872 user_handle_t from; /* handle to the first window */
1873 user_handle_t to; /* handle to the second window */
1874 @REPLY
1875 int x; /* x coordinate offset */
1876 int y; /* y coordinate offset */
1877 @END
1880 /* Get the visible region of a window */
1881 @REQ(get_visible_region)
1882 user_handle_t window; /* handle to the window */
1883 unsigned int flags; /* DCX flags */
1884 @REPLY
1885 size_t total_size; /* total size of the resulting region */
1886 VARARG(region,rectangles); /* list of rectangles for the region */
1887 @END
1890 /* Get the window region */
1891 @REQ(get_window_region)
1892 user_handle_t window; /* handle to the window */
1893 @REPLY
1894 size_t total_size; /* total size of the resulting region */
1895 VARARG(region,rectangles); /* list of rectangles for the region */
1896 @END
1899 /* Set the window region */
1900 @REQ(set_window_region)
1901 user_handle_t window; /* handle to the window */
1902 VARARG(region,rectangles); /* list of rectangles for the region */
1903 @END
1906 /* Get the window update region */
1907 @REQ(get_update_region)
1908 user_handle_t window; /* handle to the window */
1909 unsigned int flags; /* update flags (see below) */
1910 @REPLY
1911 user_handle_t child; /* child to repaint (or window itself) */
1912 unsigned int flags; /* resulting update flags (see below) */
1913 size_t total_size; /* total size of the resulting region */
1914 VARARG(region,rectangles); /* list of rectangles for the region */
1915 @END
1916 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
1917 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
1918 #define UPDATE_PAINT 0x04 /* get region for painting client area */
1919 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
1920 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
1921 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
1922 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
1925 /* Update the z order of a window so that a given rectangle is fully visible */
1926 @REQ(update_window_zorder)
1927 user_handle_t window; /* handle to the window */
1928 rectangle_t rect; /* rectangle that must be visible */
1929 @END
1932 /* Mark parts of a window as needing a redraw */
1933 @REQ(redraw_window)
1934 user_handle_t window; /* handle to the window */
1935 unsigned int flags; /* RDW_* flags */
1936 VARARG(region,rectangles); /* list of rectangles for the region */
1937 @END
1940 /* Set a window property */
1941 @REQ(set_window_property)
1942 user_handle_t window; /* handle to the window */
1943 atom_t atom; /* property atom (high-word set if it was a string) */
1944 int string; /* was atom a string originally? */
1945 obj_handle_t handle; /* handle to store */
1946 @END
1949 /* Remove a window property */
1950 @REQ(remove_window_property)
1951 user_handle_t window; /* handle to the window */
1952 atom_t atom; /* property atom */
1953 @REPLY
1954 obj_handle_t handle; /* handle stored in property */
1955 @END
1958 /* Get a window property */
1959 @REQ(get_window_property)
1960 user_handle_t window; /* handle to the window */
1961 atom_t atom; /* property atom */
1962 @REPLY
1963 obj_handle_t handle; /* handle stored in property */
1964 @END
1967 /* Get the list of properties of a window */
1968 @REQ(get_window_properties)
1969 user_handle_t window; /* handle to the window */
1970 @REPLY
1971 int total; /* total number of properties */
1972 VARARG(props,properties); /* list of properties */
1973 @END
1976 /* Attach (or detach) thread inputs */
1977 @REQ(attach_thread_input)
1978 thread_id_t tid_from; /* thread to be attached */
1979 thread_id_t tid_to; /* thread to which tid_from should be attached */
1980 int attach; /* is it an attach? */
1981 @END
1984 /* Get input data for a given thread */
1985 @REQ(get_thread_input)
1986 thread_id_t tid; /* id of thread */
1987 @REPLY
1988 user_handle_t focus; /* handle to the focus window */
1989 user_handle_t capture; /* handle to the capture window */
1990 user_handle_t active; /* handle to the active window */
1991 user_handle_t foreground; /* handle to the global foreground window */
1992 user_handle_t menu_owner; /* handle to the menu owner */
1993 user_handle_t move_size; /* handle to the moving/resizing window */
1994 user_handle_t caret; /* handle to the caret window */
1995 rectangle_t rect; /* caret rectangle */
1996 @END
1998 /* Retrieve queue keyboard state for a given thread */
1999 @REQ(get_key_state)
2000 thread_id_t tid; /* id of thread */
2001 int key; /* optional key code or -1 */
2002 @REPLY
2003 unsigned char state; /* state of specified key */
2004 VARARG(keystate,bytes); /* state array for all the keys */
2005 @END
2007 /* Set queue keyboard state for a given thread */
2008 @REQ(set_key_state)
2009 thread_id_t tid; /* id of thread */
2010 VARARG(keystate,bytes); /* state array for all the keys */
2011 @END
2013 /* Set the system foreground window */
2014 @REQ(set_foreground_window)
2015 user_handle_t handle; /* handle to the foreground window */
2016 @REPLY
2017 user_handle_t previous; /* handle to the previous foreground window */
2018 int send_msg_old; /* whether we have to send a msg to the old window */
2019 int send_msg_new; /* whether we have to send a msg to the new window */
2020 @END
2022 /* Set the current thread focus window */
2023 @REQ(set_focus_window)
2024 user_handle_t handle; /* handle to the focus window */
2025 @REPLY
2026 user_handle_t previous; /* handle to the previous focus window */
2027 @END
2029 /* Set the current thread active window */
2030 @REQ(set_active_window)
2031 user_handle_t handle; /* handle to the active window */
2032 @REPLY
2033 user_handle_t previous; /* handle to the previous active window */
2034 @END
2036 /* Set the current thread capture window */
2037 @REQ(set_capture_window)
2038 user_handle_t handle; /* handle to the capture window */
2039 unsigned int flags; /* capture flags (see below) */
2040 @REPLY
2041 user_handle_t previous; /* handle to the previous capture window */
2042 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2043 @END
2044 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2045 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2048 /* Set the current thread caret window */
2049 @REQ(set_caret_window)
2050 user_handle_t handle; /* handle to the caret window */
2051 int width; /* caret width */
2052 int height; /* caret height */
2053 @REPLY
2054 user_handle_t previous; /* handle to the previous caret window */
2055 rectangle_t old_rect; /* previous caret rectangle */
2056 int old_hide; /* previous hide count */
2057 int old_state; /* previous caret state (1=on, 0=off) */
2058 @END
2061 /* Set the current thread caret information */
2062 @REQ(set_caret_info)
2063 unsigned int flags; /* caret flags (see below) */
2064 user_handle_t handle; /* handle to the caret window */
2065 int x; /* caret x position */
2066 int y; /* caret y position */
2067 int hide; /* increment for hide count (can be negative to show it) */
2068 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2069 @REPLY
2070 user_handle_t full_handle; /* handle to the current caret window */
2071 rectangle_t old_rect; /* previous caret rectangle */
2072 int old_hide; /* previous hide count */
2073 int old_state; /* previous caret state (1=on, 0=off) */
2074 @END
2075 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2076 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2077 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2080 /* Set a window hook */
2081 @REQ(set_hook)
2082 int id; /* id of the hook */
2083 process_id_t pid; /* id of process to set the hook into */
2084 thread_id_t tid; /* id of thread to set the hook into */
2085 int event_min;
2086 int event_max;
2087 int flags;
2088 void* proc; /* hook procedure */
2089 int unicode; /* is it a unicode hook? */
2090 VARARG(module,unicode_str); /* module name */
2091 @REPLY
2092 user_handle_t handle; /* handle to the hook */
2093 @END
2096 /* Remove a window hook */
2097 @REQ(remove_hook)
2098 user_handle_t handle; /* handle to the hook */
2099 int id; /* id of the hook if handle is 0 */
2100 void* proc; /* hook procedure if handle is 0 */
2101 @END
2104 /* Start calling a hook chain */
2105 @REQ(start_hook_chain)
2106 int id; /* id of the hook */
2107 int event; /* signalled event */
2108 user_handle_t window; /* handle to the event window */
2109 int object_id; /* object id for out of context winevent */
2110 int child_id; /* child id for out of context winevent */
2111 @REPLY
2112 user_handle_t handle; /* handle to the next hook */
2113 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2114 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2115 void* proc; /* hook procedure */
2116 int unicode; /* is it a unicode hook? */
2117 VARARG(module,unicode_str); /* module name */
2118 @END
2121 /* Finished calling a hook chain */
2122 @REQ(finish_hook_chain)
2123 int id; /* id of the hook */
2124 @END
2127 /* Get the next hook to call */
2128 @REQ(get_next_hook)
2129 user_handle_t handle; /* handle to the current hook */
2130 int event; /* signalled event */
2131 user_handle_t window; /* handle to the event window */
2132 int object_id; /* object id for out of context winevent */
2133 int child_id; /* child id for out of context winevent */
2134 @REPLY
2135 user_handle_t next; /* handle to the next hook */
2136 int id; /* id of the next hook */
2137 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2138 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2139 void* proc; /* next hook procedure */
2140 int prev_unicode; /* was the previous a unicode hook? */
2141 int next_unicode; /* is the next a unicode hook? */
2142 VARARG(module,unicode_str); /* module name */
2143 @END
2146 /* Create a window class */
2147 @REQ(create_class)
2148 int local; /* is it a local class? */
2149 atom_t atom; /* class atom */
2150 unsigned int style; /* class style */
2151 void* instance; /* module instance */
2152 int extra; /* number of extra class bytes */
2153 int win_extra; /* number of window extra bytes */
2154 void* client_ptr; /* pointer to class in client address space */
2155 @END
2158 /* Destroy a window class */
2159 @REQ(destroy_class)
2160 atom_t atom; /* class atom */
2161 void* instance; /* module instance */
2162 @REPLY
2163 void* client_ptr; /* pointer to class in client address space */
2164 @END
2167 /* Set some information in a class */
2168 @REQ(set_class_info)
2169 user_handle_t window; /* handle to the window */
2170 unsigned int flags; /* flags for info to set (see below) */
2171 atom_t atom; /* class atom */
2172 unsigned int style; /* class style */
2173 int win_extra; /* number of window extra bytes */
2174 void* instance; /* module instance */
2175 int extra_offset; /* offset to set in extra bytes */
2176 size_t extra_size; /* size to set in extra bytes */
2177 unsigned int extra_value; /* value to set in extra bytes */
2178 @REPLY
2179 atom_t old_atom; /* previous class atom */
2180 unsigned int old_style; /* previous class style */
2181 int old_extra; /* previous number of class extra bytes */
2182 int old_win_extra; /* previous number of window extra bytes */
2183 void* old_instance; /* previous module instance */
2184 unsigned int old_extra_value; /* old value in extra bytes */
2185 @END
2186 #define SET_CLASS_ATOM 0x0001
2187 #define SET_CLASS_STYLE 0x0002
2188 #define SET_CLASS_WINEXTRA 0x0004
2189 #define SET_CLASS_INSTANCE 0x0008
2190 #define SET_CLASS_EXTRA 0x0010
2193 /* Set/get clipboard information */
2194 @REQ(set_clipboard_info)
2195 unsigned int flags; /* flags for fields to set (see below) */
2196 user_handle_t clipboard; /* clipboard window */
2197 user_handle_t owner; /* clipboard owner */
2198 user_handle_t viewer; /* first clipboard viewer */
2199 unsigned int seqno; /* change sequence number */
2200 @REPLY
2201 unsigned int flags; /* status flags (see below) */
2202 user_handle_t old_clipboard; /* old clipboard window */
2203 user_handle_t old_owner; /* old clipboard owner */
2204 user_handle_t old_viewer; /* old clipboard viewer */
2205 unsigned int seqno; /* current sequence number */
2206 @END
2208 #define SET_CB_OPEN 0x001
2209 #define SET_CB_OWNER 0x002
2210 #define SET_CB_VIEWER 0x004
2211 #define SET_CB_SEQNO 0x008
2212 #define SET_CB_RELOWNER 0x010
2213 #define SET_CB_CLOSE 0x020
2214 #define CB_OPEN 0x040
2215 #define CB_OWNER 0x080
2216 #define CB_PROCESS 0x100
2219 /* Open a security token */
2220 @REQ(open_token)
2221 obj_handle_t handle; /* handle to the thread or process */
2222 unsigned int flags; /* flags (see below) */
2223 @REPLY
2224 obj_handle_t token; /* handle to the token */
2225 @END
2226 #define OPEN_TOKEN_THREAD 1
2227 #define OPEN_TOKEN_AS_SELF 2
2230 /* Set/get the global windows */
2231 @REQ(set_global_windows)
2232 unsigned int flags; /* flags for fields to set (see below) */
2233 user_handle_t shell_window; /* handle to the new shell window */
2234 user_handle_t shell_listview; /* handle to the new shell listview window */
2235 user_handle_t progman_window; /* handle to the new program manager window */
2236 user_handle_t taskman_window; /* handle to the new task manager window */
2237 @REPLY
2238 user_handle_t old_shell_window; /* handle to the shell window */
2239 user_handle_t old_shell_listview; /* handle to the shell listview window */
2240 user_handle_t old_progman_window; /* handle to the new program manager window */
2241 user_handle_t old_taskman_window; /* handle to the new task manager window */
2242 @END
2243 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2244 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2245 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2247 /* Adjust the privileges held by a token */
2248 @REQ(adjust_token_privileges)
2249 obj_handle_t handle; /* handle to the token */
2250 int disable_all; /* disable all privileges? */
2251 int get_modified_state; /* get modified privileges? */
2252 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2253 @REPLY
2254 unsigned int len; /* total length in bytes required to store token privileges */
2255 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2256 @END
2258 /* Retrieves the set of privileges held by or available to a token */
2259 @REQ(get_token_privileges)
2260 obj_handle_t handle; /* handle to the token */
2261 @REPLY
2262 unsigned int len; /* total length in bytes required to store token privileges */
2263 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2264 @END
2266 @REQ(duplicate_token)
2267 obj_handle_t handle; /* handle to the token to duplicate */
2268 unsigned int access; /* access rights to the new token */
2269 int inherit; /* inherit flag */
2270 int primary; /* is the new token to be a primary one? */
2271 int impersonation_level; /* impersonation level of the new token */
2272 @REPLY
2273 obj_handle_t new_handle; /* duplicated handle */
2274 @END