2 * Wine server definitions
4 * Copyright (C) 1998 Alexandre Julliard
7 #ifndef __WINE_SERVER_H
8 #define __WINE_SERVER_H
14 /* Request structures */
16 /* Following are the definitions of all the client<->server */
17 /* communication format; if you make any change in this file, */
18 /* you must run tools/make_requests again. */
21 /* These empty macros are used by tools/make_requests */
22 /* to generate the request/reply tracing functions */
23 #define IN /*nothing*/
24 #define OUT /*nothing*/
25 #define VARARG(name,func) /*nothing*/
29 IN
int req
; /* request code */
30 IN
unsigned short fixed_size
; /* size of the fixed part of the request */
31 IN
unsigned short var_size
; /* size of the variable part of the request */
32 OUT
unsigned int error
; /* error result */
34 #define REQUEST_HEADER struct request_header header
37 /* placeholder structure for the maximum allowed request size */
38 /* this is used to construct the generic_request union */
39 struct request_max_size
41 int pad
[16]; /* the max request size is 16 ints */
44 /* max size of the variable part of a request */
45 #define REQUEST_MAX_VAR_SIZE 1024
49 /* definitions of the event data depending on the event code */
50 struct debug_event_exception
52 EXCEPTION_RECORD record
; /* exception record */
53 int first
; /* first chance exception? */
55 struct debug_event_create_thread
57 handle_t handle
; /* handle to the new thread */
58 void *teb
; /* thread teb (in debugged process address space) */
59 void *start
; /* thread startup routine */
61 struct debug_event_create_process
63 handle_t file
; /* handle to the process exe file */
64 handle_t process
; /* handle to the new process */
65 handle_t thread
; /* handle to the new thread */
66 void *base
; /* base of executable image */
67 int dbg_offset
; /* offset of debug info in file */
68 int dbg_size
; /* size of debug info */
69 void *teb
; /* thread teb (in debugged process address space) */
70 void *start
; /* thread startup routine */
71 void *name
; /* image name (optional) */
72 int unicode
; /* is it Unicode? */
74 struct debug_event_exit
76 int exit_code
; /* thread or process exit code */
78 struct debug_event_load_dll
80 handle_t handle
; /* file handle for the dll */
81 void *base
; /* base address of the dll */
82 int dbg_offset
; /* offset of debug info in file */
83 int dbg_size
; /* size of debug info */
84 void *name
; /* image name (optional) */
85 int unicode
; /* is it Unicode? */
87 struct debug_event_unload_dll
89 void *base
; /* base address of the dll */
91 struct debug_event_output_string
93 void *string
; /* string to display (in debugged process address space) */
94 int unicode
; /* is it Unicode? */
95 int length
; /* string length */
97 struct debug_event_rip_info
102 union debug_event_data
104 struct debug_event_exception exception
;
105 struct debug_event_create_thread create_thread
;
106 struct debug_event_create_process create_process
;
107 struct debug_event_exit exit
;
108 struct debug_event_load_dll load_dll
;
109 struct debug_event_unload_dll unload_dll
;
110 struct debug_event_output_string output_string
;
111 struct debug_event_rip_info rip_info
;
114 /* debug event data */
117 int code
; /* event code */
118 union debug_event_data info
; /* event information */
122 /* Create a new process from the context of the parent */
123 struct new_process_request
125 REQUEST_HEADER
; /* request header */
126 IN
int inherit_all
; /* inherit all handles from parent */
127 IN
int create_flags
; /* creation flags */
128 IN
int start_flags
; /* flags from startup info */
129 IN handle_t exe_file
; /* file handle for main exe */
130 IN handle_t hstdin
; /* handle for stdin */
131 IN handle_t hstdout
; /* handle for stdout */
132 IN handle_t hstderr
; /* handle for stderr */
133 IN
int cmd_show
; /* main window show mode */
134 OUT handle_t info
; /* new process info handle */
135 IN
VARARG(filename
,string
); /* file name of main exe */
139 /* Retrieve information about a newly started process */
140 struct get_new_process_info_request
142 REQUEST_HEADER
; /* request header */
143 IN handle_t info
; /* info handle returned from new_process_request */
144 IN
int pinherit
; /* process handle inherit flag */
145 IN
int tinherit
; /* thread handle inherit flag */
146 OUT
void* pid
; /* process id */
147 OUT handle_t phandle
; /* process handle (in the current process) */
148 OUT
void* tid
; /* thread id */
149 OUT handle_t thandle
; /* thread handle (in the current process) */
150 OUT handle_t event
; /* event handle to signal startup */
154 /* Create a new thread from the context of the parent */
155 struct new_thread_request
157 REQUEST_HEADER
; /* request header */
158 IN
int suspend
; /* new thread should be suspended on creation */
159 IN
int inherit
; /* inherit flag */
160 OUT
void* tid
; /* thread id */
161 OUT handle_t handle
; /* thread handle (in the current process) */
165 /* Signal that we are finished booting on the client side */
166 struct boot_done_request
168 REQUEST_HEADER
; /* request header */
169 IN
int debug_level
; /* new debug level */
173 /* Initialize a process; called from the new process context */
174 struct init_process_request
176 REQUEST_HEADER
; /* request header */
177 IN
void* ldt_copy
; /* addr of LDT copy */
178 IN
int ppid
; /* parent Unix pid */
179 OUT
int start_flags
; /* flags from startup info */
180 OUT
unsigned int server_start
; /* server start time (GetTickCount) */
181 OUT handle_t exe_file
; /* file handle for main exe */
182 OUT handle_t hstdin
; /* handle for stdin */
183 OUT handle_t hstdout
; /* handle for stdout */
184 OUT handle_t hstderr
; /* handle for stderr */
185 OUT
int cmd_show
; /* main window show mode */
186 OUT
VARARG(filename
,string
); /* file name of main exe */
190 /* Signal the end of the process initialization */
191 struct init_process_done_request
193 REQUEST_HEADER
; /* request header */
194 IN
void* module
; /* main module base address */
195 IN
void* entry
; /* process entry point */
196 IN
void* name
; /* ptr to ptr to name (in process addr space) */
197 IN handle_t exe_file
; /* file handle for main exe */
198 IN
int gui
; /* is it a GUI process? */
199 OUT
int debugged
; /* being debugged? */
203 /* Initialize a thread; called from the child after fork()/clone() */
204 struct init_thread_request
206 REQUEST_HEADER
; /* request header */
207 IN
int unix_pid
; /* Unix pid of new thread */
208 IN
void* teb
; /* TEB of new thread (in thread address space) */
209 IN
void* entry
; /* thread entry point (in thread address space) */
213 /* Retrieve the thread buffer file descriptor */
214 /* The reply to this request is the first thing a newly */
215 /* created thread gets (without having to request it) */
216 struct get_thread_buffer_request
218 REQUEST_HEADER
; /* request header */
219 OUT
void* pid
; /* process id of the new thread's process */
220 OUT
void* tid
; /* thread id of the new thread */
221 OUT
int boot
; /* is this the boot thread? */
222 OUT
int version
; /* protocol version */
226 /* Terminate a process */
227 struct terminate_process_request
229 REQUEST_HEADER
; /* request header */
230 IN handle_t handle
; /* process handle to terminate */
231 IN
int exit_code
; /* process exit code */
232 OUT
int self
; /* suicide? */
236 /* Terminate a thread */
237 struct terminate_thread_request
239 REQUEST_HEADER
; /* request header */
240 IN handle_t handle
; /* thread handle to terminate */
241 IN
int exit_code
; /* thread exit code */
242 OUT
int self
; /* suicide? */
243 OUT
int last
; /* last thread in this process? */
247 /* Retrieve information about a process */
248 struct get_process_info_request
250 REQUEST_HEADER
; /* request header */
251 IN handle_t handle
; /* process handle */
252 OUT
void* pid
; /* server process id */
253 OUT
int debugged
; /* debugged? */
254 OUT
int exit_code
; /* process exit code */
255 OUT
int priority
; /* priority class */
256 OUT
int process_affinity
; /* process affinity mask */
257 OUT
int system_affinity
; /* system affinity mask */
261 /* Set a process informations */
262 struct set_process_info_request
264 REQUEST_HEADER
; /* request header */
265 IN handle_t handle
; /* process handle */
266 IN
int mask
; /* setting mask (see below) */
267 IN
int priority
; /* priority class */
268 IN
int affinity
; /* affinity mask */
270 #define SET_PROCESS_INFO_PRIORITY 0x01
271 #define SET_PROCESS_INFO_AFFINITY 0x02
274 /* Retrieve information about a thread */
275 struct get_thread_info_request
277 REQUEST_HEADER
; /* request header */
278 IN handle_t handle
; /* thread handle */
279 IN
void* tid_in
; /* thread id (optional) */
280 OUT
void* tid
; /* server thread id */
281 OUT
void* teb
; /* thread teb pointer */
282 OUT
int exit_code
; /* thread exit code */
283 OUT
int priority
; /* thread priority level */
287 /* Set a thread informations */
288 struct set_thread_info_request
290 REQUEST_HEADER
; /* request header */
291 IN handle_t handle
; /* thread handle */
292 IN
int mask
; /* setting mask (see below) */
293 IN
int priority
; /* priority class */
294 IN
int affinity
; /* affinity mask */
296 #define SET_THREAD_INFO_PRIORITY 0x01
297 #define SET_THREAD_INFO_AFFINITY 0x02
300 /* Suspend a thread */
301 struct suspend_thread_request
303 REQUEST_HEADER
; /* request header */
304 IN handle_t handle
; /* thread handle */
305 OUT
int count
; /* new suspend count */
309 /* Resume a thread */
310 struct resume_thread_request
312 REQUEST_HEADER
; /* request header */
313 IN handle_t handle
; /* thread handle */
314 OUT
int count
; /* new suspend count */
318 /* Notify the server that a dll has been loaded */
319 struct load_dll_request
321 REQUEST_HEADER
; /* request header */
322 IN handle_t handle
; /* file handle */
323 IN
void* base
; /* base address */
324 IN
int dbg_offset
; /* debug info offset */
325 IN
int dbg_size
; /* debug info size */
326 IN
void* name
; /* ptr to ptr to name (in process addr space) */
330 /* Notify the server that a dll is being unloaded */
331 struct unload_dll_request
333 REQUEST_HEADER
; /* request header */
334 IN
void* base
; /* base address */
338 /* Queue an APC for a thread */
339 struct queue_apc_request
341 REQUEST_HEADER
; /* request header */
342 IN handle_t handle
; /* thread handle */
343 IN
int user
; /* user or system apc? */
344 IN
void* func
; /* function to call */
345 IN
void* param
; /* param for function to call */
349 /* Get next APC to call */
350 struct get_apc_request
352 REQUEST_HEADER
; /* request header */
353 IN
int alertable
; /* is thread alertable? */
354 OUT
void* func
; /* function to call */
355 OUT
int type
; /* function type */
356 OUT
VARARG(args
,ptrs
); /* function arguments */
358 enum apc_type
{ APC_NONE
, APC_USER
, APC_TIMER
, APC_ASYNC
};
361 /* Close a handle for the current process */
362 struct close_handle_request
364 REQUEST_HEADER
; /* request header */
365 IN handle_t handle
; /* handle to close */
366 OUT
int fd
; /* associated fd to close */
370 /* Set a handle information */
371 struct set_handle_info_request
373 REQUEST_HEADER
; /* request header */
374 IN handle_t handle
; /* handle we are interested in */
375 IN
int flags
; /* new handle flags */
376 IN
int mask
; /* mask for flags to set */
377 IN
int fd
; /* file descriptor or -1 */
378 OUT
int old_flags
; /* old flag value */
379 OUT
int cur_fd
; /* current file descriptor */
383 /* Duplicate a handle */
384 struct dup_handle_request
386 REQUEST_HEADER
; /* request header */
387 IN handle_t src_process
; /* src process handle */
388 IN handle_t src_handle
; /* src handle to duplicate */
389 IN handle_t dst_process
; /* dst process handle */
390 IN
unsigned int access
; /* wanted access rights */
391 IN
int inherit
; /* inherit flag */
392 IN
int options
; /* duplicate options (see below) */
393 OUT handle_t handle
; /* duplicated handle in dst process */
394 OUT
int fd
; /* associated fd to close */
396 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
397 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
398 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
401 /* Open a handle to a process */
402 struct open_process_request
404 REQUEST_HEADER
; /* request header */
405 IN
void* pid
; /* process id to open */
406 IN
unsigned int access
; /* wanted access rights */
407 IN
int inherit
; /* inherit flag */
408 OUT handle_t handle
; /* handle to the process */
412 /* Wait for handles */
413 struct select_request
415 REQUEST_HEADER
; /* request header */
416 IN
int flags
; /* wait flags (see below) */
417 IN
int sec
; /* absolute timeout */
418 IN
int usec
; /* absolute timeout */
419 OUT
int signaled
; /* signaled handle */
420 IN
VARARG(handles
,handles
); /* handles to select on */
423 #define SELECT_ALERTABLE 2
424 #define SELECT_INTERRUPTIBLE 4
425 #define SELECT_TIMEOUT 8
428 /* Create an event */
429 struct create_event_request
431 REQUEST_HEADER
; /* request header */
432 IN
int manual_reset
; /* manual reset event */
433 IN
int initial_state
; /* initial state of the event */
434 IN
int inherit
; /* inherit flag */
435 OUT handle_t handle
; /* handle to the event */
436 IN
VARARG(name
,unicode_str
); /* object name */
439 /* Event operation */
440 struct event_op_request
442 REQUEST_HEADER
; /* request header */
443 IN handle_t handle
; /* handle to event */
444 IN
int op
; /* event operation (see below) */
446 enum event_op
{ PULSE_EVENT
, SET_EVENT
, RESET_EVENT
};
450 struct open_event_request
452 REQUEST_HEADER
; /* request header */
453 IN
unsigned int access
; /* wanted access rights */
454 IN
int inherit
; /* inherit flag */
455 OUT handle_t handle
; /* handle to the event */
456 IN
VARARG(name
,unicode_str
); /* object name */
461 struct create_mutex_request
463 REQUEST_HEADER
; /* request header */
464 IN
int owned
; /* initially owned? */
465 IN
int inherit
; /* inherit flag */
466 OUT handle_t handle
; /* handle to the mutex */
467 IN
VARARG(name
,unicode_str
); /* object name */
471 /* Release a mutex */
472 struct release_mutex_request
474 REQUEST_HEADER
; /* request header */
475 IN handle_t handle
; /* handle to the mutex */
480 struct open_mutex_request
482 REQUEST_HEADER
; /* request header */
483 IN
unsigned int access
; /* wanted access rights */
484 IN
int inherit
; /* inherit flag */
485 OUT handle_t handle
; /* handle to the mutex */
486 IN
VARARG(name
,unicode_str
); /* object name */
490 /* Create a semaphore */
491 struct create_semaphore_request
493 REQUEST_HEADER
; /* request header */
494 IN
unsigned int initial
; /* initial count */
495 IN
unsigned int max
; /* maximum count */
496 IN
int inherit
; /* inherit flag */
497 OUT handle_t handle
; /* handle to the semaphore */
498 IN
VARARG(name
,unicode_str
); /* object name */
502 /* Release a semaphore */
503 struct release_semaphore_request
505 REQUEST_HEADER
; /* request header */
506 IN handle_t handle
; /* handle to the semaphore */
507 IN
unsigned int count
; /* count to add to semaphore */
508 OUT
unsigned int prev_count
; /* previous semaphore count */
512 /* Open a semaphore */
513 struct open_semaphore_request
515 REQUEST_HEADER
; /* request header */
516 IN
unsigned int access
; /* wanted access rights */
517 IN
int inherit
; /* inherit flag */
518 OUT handle_t handle
; /* handle to the semaphore */
519 IN
VARARG(name
,unicode_str
); /* object name */
524 struct create_file_request
526 REQUEST_HEADER
; /* request header */
527 IN
unsigned int access
; /* wanted access rights */
528 IN
int inherit
; /* inherit flag */
529 IN
unsigned int sharing
; /* sharing flags */
530 IN
int create
; /* file create action */
531 IN
unsigned int attrs
; /* file attributes for creation */
532 OUT handle_t handle
; /* handle to the file */
533 IN
VARARG(filename
,string
); /* file name */
537 /* Allocate a file handle for a Unix fd */
538 struct alloc_file_handle_request
540 REQUEST_HEADER
; /* request header */
541 IN
unsigned int access
; /* wanted access rights */
542 OUT handle_t handle
; /* handle to the file */
546 /* Get a Unix fd to access a file */
547 struct get_handle_fd_request
549 REQUEST_HEADER
; /* request header */
550 IN handle_t handle
; /* handle to the file */
551 IN
unsigned int access
; /* wanted access rights */
552 OUT
int fd
; /* file descriptor */
556 /* Set a file current position */
557 struct set_file_pointer_request
559 REQUEST_HEADER
; /* request header */
560 IN handle_t handle
; /* handle to the file */
561 IN
int low
; /* position low word */
562 IN
int high
; /* position high word */
563 IN
int whence
; /* whence to seek */
564 OUT
int new_low
; /* new position low word */
565 OUT
int new_high
; /* new position high word */
569 /* Truncate (or extend) a file */
570 struct truncate_file_request
572 REQUEST_HEADER
; /* request header */
573 IN handle_t handle
; /* handle to the file */
577 /* Set a file access and modification times */
578 struct set_file_time_request
580 REQUEST_HEADER
; /* request header */
581 IN handle_t handle
; /* handle to the file */
582 IN
time_t access_time
; /* last access time */
583 IN
time_t write_time
; /* last write time */
587 /* Flush a file buffers */
588 struct flush_file_request
590 REQUEST_HEADER
; /* request header */
591 IN handle_t handle
; /* handle to the file */
595 /* Get information about a file */
596 struct get_file_info_request
598 REQUEST_HEADER
; /* request header */
599 IN handle_t handle
; /* handle to the file */
600 OUT
int type
; /* file type */
601 OUT
int attr
; /* file attributes */
602 OUT
time_t access_time
; /* last access time */
603 OUT
time_t write_time
; /* last write time */
604 OUT
int size_high
; /* file size */
605 OUT
int size_low
; /* file size */
606 OUT
int links
; /* number of links */
607 OUT
int index_high
; /* unique index */
608 OUT
int index_low
; /* unique index */
609 OUT
unsigned int serial
; /* volume serial number */
613 /* Lock a region of a file */
614 struct lock_file_request
616 REQUEST_HEADER
; /* request header */
617 IN handle_t handle
; /* handle to the file */
618 IN
unsigned int offset_low
; /* offset of start of lock */
619 IN
unsigned int offset_high
; /* offset of start of lock */
620 IN
unsigned int count_low
; /* count of bytes to lock */
621 IN
unsigned int count_high
; /* count of bytes to lock */
625 /* Unlock a region of a file */
626 struct unlock_file_request
628 REQUEST_HEADER
; /* request header */
629 IN handle_t handle
; /* handle to the file */
630 IN
unsigned int offset_low
; /* offset of start of unlock */
631 IN
unsigned int offset_high
; /* offset of start of unlock */
632 IN
unsigned int count_low
; /* count of bytes to unlock */
633 IN
unsigned int count_high
; /* count of bytes to unlock */
637 /* Create an anonymous pipe */
638 struct create_pipe_request
640 REQUEST_HEADER
; /* request header */
641 IN
int inherit
; /* inherit flag */
642 OUT handle_t handle_read
; /* handle to the read-side of the pipe */
643 OUT handle_t handle_write
; /* handle to the write-side of the pipe */
647 /* Create a socket */
648 struct create_socket_request
650 REQUEST_HEADER
; /* request header */
651 IN
unsigned int access
; /* wanted access rights */
652 IN
int inherit
; /* inherit flag */
653 IN
int family
; /* family, see socket manpage */
654 IN
int type
; /* type, see socket manpage */
655 IN
int protocol
; /* protocol, see socket manpage */
656 OUT handle_t handle
; /* handle to the new socket */
660 /* Accept a socket */
661 struct accept_socket_request
663 REQUEST_HEADER
; /* request header */
664 IN handle_t lhandle
; /* handle to the listening socket */
665 IN
unsigned int access
; /* wanted access rights */
666 IN
int inherit
; /* inherit flag */
667 OUT handle_t handle
; /* handle to the new socket */
671 /* Set socket event parameters */
672 struct set_socket_event_request
674 REQUEST_HEADER
; /* request header */
675 IN handle_t handle
; /* handle to the socket */
676 IN
unsigned int mask
; /* event mask */
677 IN handle_t event
; /* event object */
681 /* Get socket event parameters */
682 struct get_socket_event_request
684 REQUEST_HEADER
; /* request header */
685 IN handle_t handle
; /* handle to the socket */
686 IN
int service
; /* clear pending? */
687 IN handle_t s_event
; /* "expected" event object */
688 IN handle_t c_event
; /* event to clear */
689 OUT
unsigned int mask
; /* event mask */
690 OUT
unsigned int pmask
; /* pending events */
691 OUT
unsigned int state
; /* status bits */
692 OUT
VARARG(errors
,ints
); /* event errors */
696 /* Reenable pending socket events */
697 struct enable_socket_event_request
699 REQUEST_HEADER
; /* request header */
700 IN handle_t handle
; /* handle to the socket */
701 IN
unsigned int mask
; /* events to re-enable */
702 IN
unsigned int sstate
; /* status bits to set */
703 IN
unsigned int cstate
; /* status bits to clear */
707 /* Allocate a console for the current process */
708 struct alloc_console_request
710 REQUEST_HEADER
; /* request header */
711 IN
unsigned int access
; /* wanted access rights */
712 IN
int inherit
; /* inherit flag */
713 OUT handle_t handle_in
; /* handle to console input */
714 OUT handle_t handle_out
; /* handle to console output */
718 /* Free the console of the current process */
719 struct free_console_request
721 REQUEST_HEADER
; /* request header */
725 /* Open a handle to the process console */
726 struct open_console_request
728 REQUEST_HEADER
; /* request header */
729 IN
int output
; /* input or output? */
730 IN
unsigned int access
; /* wanted access rights */
731 IN
int inherit
; /* inherit flag */
732 OUT handle_t handle
; /* handle to the console */
736 /* Set a console file descriptor */
737 struct set_console_fd_request
739 REQUEST_HEADER
; /* request header */
740 IN handle_t handle
; /* handle to the console */
741 IN handle_t file_handle
; /* handle of file to use as file descriptor */
742 IN
int pid
; /* pid of xterm (hack) */
746 /* Get a console mode (input or output) */
747 struct get_console_mode_request
749 REQUEST_HEADER
; /* request header */
750 IN handle_t handle
; /* handle to the console */
751 OUT
int mode
; /* console mode */
755 /* Set a console mode (input or output) */
756 struct set_console_mode_request
758 REQUEST_HEADER
; /* request header */
759 IN handle_t handle
; /* handle to the console */
760 IN
int mode
; /* console mode */
764 /* Set info about a console (output only) */
765 struct set_console_info_request
767 REQUEST_HEADER
; /* request header */
768 IN handle_t handle
; /* handle to the console */
769 IN
int mask
; /* setting mask (see below) */
770 IN
int cursor_size
; /* size of cursor (percentage filled) */
771 IN
int cursor_visible
;/* cursor visibility flag */
772 IN
VARARG(title
,string
); /* console title */
774 #define SET_CONSOLE_INFO_CURSOR 0x01
775 #define SET_CONSOLE_INFO_TITLE 0x02
777 /* Get info about a console (output only) */
778 struct get_console_info_request
780 REQUEST_HEADER
; /* request header */
781 IN handle_t handle
; /* handle to the console */
782 OUT
int cursor_size
; /* size of cursor (percentage filled) */
783 OUT
int cursor_visible
;/* cursor visibility flag */
784 OUT
int pid
; /* pid of xterm (hack) */
785 OUT
VARARG(title
,string
); /* console title */
789 /* Add input records to a console input queue */
790 struct write_console_input_request
792 REQUEST_HEADER
; /* request header */
793 IN handle_t handle
; /* handle to the console input */
794 OUT
int written
; /* number of records written */
795 IN
VARARG(rec
,input_records
); /* input records */
798 /* Fetch input records from a console input queue */
799 struct read_console_input_request
801 REQUEST_HEADER
; /* request header */
802 IN handle_t handle
; /* handle to the console input */
803 IN
int flush
; /* flush the retrieved records from the queue? */
804 OUT
int read
; /* number of records read */
805 OUT
VARARG(rec
,input_records
); /* input records */
809 /* Create a change notification */
810 struct create_change_notification_request
812 REQUEST_HEADER
; /* request header */
813 IN
int subtree
; /* watch all the subtree */
814 IN
int filter
; /* notification filter */
815 OUT handle_t handle
; /* handle to the change notification */
819 /* Create a file mapping */
820 struct create_mapping_request
822 REQUEST_HEADER
; /* request header */
823 IN
int size_high
; /* mapping size */
824 IN
int size_low
; /* mapping size */
825 IN
int protect
; /* protection flags (see below) */
826 IN
int inherit
; /* inherit flag */
827 IN handle_t file_handle
; /* file handle */
828 OUT handle_t handle
; /* handle to the mapping */
829 IN
VARARG(name
,unicode_str
); /* object name */
831 /* protection flags */
832 #define VPROT_READ 0x01
833 #define VPROT_WRITE 0x02
834 #define VPROT_EXEC 0x04
835 #define VPROT_WRITECOPY 0x08
836 #define VPROT_GUARD 0x10
837 #define VPROT_NOCACHE 0x20
838 #define VPROT_COMMITTED 0x40
839 #define VPROT_IMAGE 0x80
843 struct open_mapping_request
845 REQUEST_HEADER
; /* request header */
846 IN
unsigned int access
; /* wanted access rights */
847 IN
int inherit
; /* inherit flag */
848 OUT handle_t handle
; /* handle to the mapping */
849 IN
VARARG(name
,unicode_str
); /* object name */
853 /* Get information about a file mapping */
854 struct get_mapping_info_request
856 REQUEST_HEADER
; /* request header */
857 IN handle_t handle
; /* handle to the mapping */
858 OUT
int size_high
; /* mapping size */
859 OUT
int size_low
; /* mapping size */
860 OUT
int protect
; /* protection flags */
861 OUT
int header_size
; /* header size (for VPROT_IMAGE mapping) */
862 OUT
void* base
; /* default base addr (for VPROT_IMAGE mapping) */
863 OUT handle_t shared_file
; /* shared mapping file handle */
864 OUT
int shared_size
; /* shared mapping size */
865 OUT
int anonymous
; /* anonymous mapping? */
869 /* Create a device */
870 struct create_device_request
872 REQUEST_HEADER
; /* request header */
873 IN
unsigned int access
; /* wanted access rights */
874 IN
int inherit
; /* inherit flag */
875 IN
int id
; /* client private id */
876 OUT handle_t handle
; /* handle to the device */
880 /* Create a snapshot */
881 struct create_snapshot_request
883 REQUEST_HEADER
; /* request header */
884 IN
int inherit
; /* inherit flag */
885 IN
int flags
; /* snapshot flags (TH32CS_*) */
886 IN
void* pid
; /* process id */
887 OUT handle_t handle
; /* handle to the snapshot */
891 /* Get the next process from a snapshot */
892 struct next_process_request
894 REQUEST_HEADER
; /* request header */
895 IN handle_t handle
; /* handle to the snapshot */
896 IN
int reset
; /* reset snapshot position? */
897 OUT
int count
; /* process usage count */
898 OUT
void* pid
; /* process id */
899 OUT
int threads
; /* number of threads */
900 OUT
int priority
; /* process priority */
904 /* Get the next thread from a snapshot */
905 struct next_thread_request
907 REQUEST_HEADER
; /* request header */
908 IN handle_t handle
; /* handle to the snapshot */
909 IN
int reset
; /* reset snapshot position? */
910 OUT
int count
; /* thread usage count */
911 OUT
void* pid
; /* process id */
912 OUT
void* tid
; /* thread id */
913 OUT
int base_pri
; /* base priority */
914 OUT
int delta_pri
; /* delta priority */
918 /* Get the next module from a snapshot */
919 struct next_module_request
921 REQUEST_HEADER
; /* request header */
922 IN handle_t handle
; /* handle to the snapshot */
923 IN
int reset
; /* reset snapshot position? */
924 OUT
void* pid
; /* process id */
925 OUT
void* base
; /* module base address */
929 /* Wait for a debug event */
930 struct wait_debug_event_request
932 REQUEST_HEADER
; /* request header */
933 IN
int get_handle
; /* should we alloc a handle for waiting? */
934 OUT
void* pid
; /* process id */
935 OUT
void* tid
; /* thread id */
936 OUT handle_t wait
; /* wait handle if no event ready */
937 OUT
VARARG(event
,debug_event
); /* debug event data */
941 /* Queue an exception event */
942 struct queue_exception_event_request
944 REQUEST_HEADER
; /* request header */
945 IN
int first
; /* first chance exception? */
946 OUT handle_t handle
; /* handle to the queued event */
947 IN
VARARG(record
,exc_event
); /* thread context followed by exception record */
951 /* Retrieve the status of an exception event */
952 struct get_exception_status_request
954 REQUEST_HEADER
; /* request header */
955 OUT handle_t handle
; /* handle to the queued event */
956 OUT
int status
; /* event continuation status */
957 OUT
VARARG(context
,context
); /* modified thread context */
961 /* Send an output string to the debugger */
962 struct output_debug_string_request
964 REQUEST_HEADER
; /* request header */
965 IN
void* string
; /* string to display (in debugged process address space) */
966 IN
int unicode
; /* is it Unicode? */
967 IN
int length
; /* string length */
971 /* Continue a debug event */
972 struct continue_debug_event_request
974 REQUEST_HEADER
; /* request header */
975 IN
void* pid
; /* process id to continue */
976 IN
void* tid
; /* thread id to continue */
977 IN
int status
; /* continuation status */
981 /* Start debugging an existing process */
982 struct debug_process_request
984 REQUEST_HEADER
; /* request header */
985 IN
void* pid
; /* id of the process to debug */
989 /* Read data from a process address space */
990 struct read_process_memory_request
992 REQUEST_HEADER
; /* request header */
993 IN handle_t handle
; /* process handle */
994 IN
void* addr
; /* addr to read from (must be int-aligned) */
995 IN
int len
; /* number of ints to read */
996 OUT
VARARG(data
,bytes
); /* result data */
1000 /* Write data to a process address space */
1001 struct write_process_memory_request
1003 REQUEST_HEADER
; /* request header */
1004 IN handle_t handle
; /* process handle */
1005 IN
void* addr
; /* addr to write to (must be int-aligned) */
1006 IN
int len
; /* number of ints to write */
1007 IN
unsigned int first_mask
; /* mask for first word */
1008 IN
unsigned int last_mask
; /* mask for last word */
1009 IN
VARARG(data
,bytes
); /* result data */
1013 /* Create a registry key */
1014 struct create_key_request
1016 REQUEST_HEADER
; /* request header */
1017 IN handle_t parent
; /* handle to the parent key */
1018 IN
unsigned int access
; /* desired access rights */
1019 IN
unsigned int options
; /* creation options */
1020 IN
time_t modif
; /* last modification time */
1021 OUT handle_t hkey
; /* handle to the created key */
1022 OUT
int created
; /* has it been newly created? */
1023 IN
VARARG(name
,unicode_len_str
); /* key name */
1024 IN
VARARG(class,unicode_str
); /* class name */
1027 /* Open a registry key */
1028 struct open_key_request
1030 REQUEST_HEADER
; /* request header */
1031 IN handle_t parent
; /* handle to the parent key */
1032 IN
unsigned int access
; /* desired access rights */
1033 OUT handle_t hkey
; /* handle to the open key */
1034 IN
VARARG(name
,unicode_str
); /* key name */
1038 /* Delete a registry key */
1039 struct delete_key_request
1041 REQUEST_HEADER
; /* request header */
1042 IN handle_t hkey
; /* handle to the key */
1046 /* Enumerate registry subkeys */
1047 struct enum_key_request
1049 REQUEST_HEADER
; /* request header */
1050 IN handle_t hkey
; /* handle to registry key */
1051 IN
int index
; /* index of subkey (or -1 for current key) */
1052 IN
int full
; /* return the full info? */
1053 OUT
int subkeys
; /* number of subkeys */
1054 OUT
int max_subkey
; /* longest subkey name */
1055 OUT
int max_class
; /* longest class name */
1056 OUT
int values
; /* number of values */
1057 OUT
int max_value
; /* longest value name */
1058 OUT
int max_data
; /* longest value data */
1059 OUT
time_t modif
; /* last modification time */
1060 OUT
VARARG(name
,unicode_len_str
); /* key name */
1061 OUT
VARARG(class,unicode_str
); /* class name */
1065 /* Set a value of a registry key */
1066 struct set_key_value_request
1068 REQUEST_HEADER
; /* request header */
1069 IN handle_t hkey
; /* handle to registry key */
1070 IN
int type
; /* value type */
1071 IN
unsigned int total
; /* total value len */
1072 IN
unsigned int offset
; /* offset for setting data */
1073 IN
VARARG(name
,unicode_len_str
); /* value name */
1074 IN
VARARG(data
,bytes
); /* value data */
1078 /* Retrieve the value of a registry key */
1079 struct get_key_value_request
1081 REQUEST_HEADER
; /* request header */
1082 IN handle_t hkey
; /* handle to registry key */
1083 IN
unsigned int offset
; /* offset for getting data */
1084 OUT
int type
; /* value type */
1085 OUT
int len
; /* value data len */
1086 IN
VARARG(name
,unicode_len_str
); /* value name */
1087 OUT
VARARG(data
,bytes
); /* value data */
1091 /* Enumerate a value of a registry key */
1092 struct enum_key_value_request
1094 REQUEST_HEADER
; /* request header */
1095 IN handle_t hkey
; /* handle to registry key */
1096 IN
int index
; /* value index */
1097 IN
unsigned int offset
; /* offset for getting data */
1098 OUT
int type
; /* value type */
1099 OUT
int len
; /* value data len */
1100 OUT
VARARG(name
,unicode_len_str
); /* value name */
1101 OUT
VARARG(data
,bytes
); /* value data */
1105 /* Delete a value of a registry key */
1106 struct delete_key_value_request
1108 REQUEST_HEADER
; /* request header */
1109 IN handle_t hkey
; /* handle to registry key */
1110 IN
VARARG(name
,unicode_str
); /* value name */
1114 /* Load a registry branch from a file */
1115 struct load_registry_request
1117 REQUEST_HEADER
; /* request header */
1118 IN handle_t hkey
; /* root key to load to */
1119 IN handle_t file
; /* file to load from */
1120 IN
VARARG(name
,unicode_str
); /* subkey name */
1124 /* Save a registry branch to a file */
1125 struct save_registry_request
1127 REQUEST_HEADER
; /* request header */
1128 IN handle_t hkey
; /* key to save */
1129 IN handle_t file
; /* file to save to */
1133 /* Save a registry branch at server exit */
1134 struct save_registry_atexit_request
1136 REQUEST_HEADER
; /* request header */
1137 IN handle_t hkey
; /* key to save */
1138 IN
VARARG(file
,string
); /* file to save to */
1142 /* Set the current and saving level for the registry */
1143 struct set_registry_levels_request
1145 REQUEST_HEADER
; /* request header */
1146 IN
int current
; /* new current level */
1147 IN
int saving
; /* new saving level */
1148 IN
int period
; /* duration between periodic saves (milliseconds) */
1152 /* Create a waitable timer */
1153 struct create_timer_request
1155 REQUEST_HEADER
; /* request header */
1156 IN
int inherit
; /* inherit flag */
1157 IN
int manual
; /* manual reset */
1158 OUT handle_t handle
; /* handle to the timer */
1159 IN
VARARG(name
,unicode_str
); /* object name */
1163 /* Open a waitable timer */
1164 struct open_timer_request
1166 REQUEST_HEADER
; /* request header */
1167 IN
unsigned int access
; /* wanted access rights */
1168 IN
int inherit
; /* inherit flag */
1169 OUT handle_t handle
; /* handle to the timer */
1170 IN
VARARG(name
,unicode_str
); /* object name */
1173 /* Set a waitable timer */
1174 struct set_timer_request
1176 REQUEST_HEADER
; /* request header */
1177 IN handle_t handle
; /* handle to the timer */
1178 IN
int sec
; /* next expiration absolute time */
1179 IN
int usec
; /* next expiration absolute time */
1180 IN
int period
; /* timer period in ms */
1181 IN
void* callback
; /* callback function */
1182 IN
void* arg
; /* callback argument */
1185 /* Cancel a waitable timer */
1186 struct cancel_timer_request
1188 REQUEST_HEADER
; /* request header */
1189 IN handle_t handle
; /* handle to the timer */
1193 /* Retrieve the current context of a thread */
1194 struct get_thread_context_request
1196 REQUEST_HEADER
; /* request header */
1197 IN handle_t handle
; /* thread handle */
1198 IN
unsigned int flags
; /* context flags */
1199 OUT
VARARG(context
,context
); /* thread context */
1203 /* Set the current context of a thread */
1204 struct set_thread_context_request
1206 REQUEST_HEADER
; /* request header */
1207 IN handle_t handle
; /* thread handle */
1208 IN
unsigned int flags
; /* context flags */
1209 IN
VARARG(context
,context
); /* thread context */
1213 /* Fetch a selector entry for a thread */
1214 struct get_selector_entry_request
1216 REQUEST_HEADER
; /* request header */
1217 IN handle_t handle
; /* thread handle */
1218 IN
int entry
; /* LDT entry */
1219 OUT
unsigned int base
; /* selector base */
1220 OUT
unsigned int limit
; /* selector limit */
1221 OUT
unsigned char flags
; /* selector flags */
1226 struct add_atom_request
1228 REQUEST_HEADER
; /* request header */
1229 IN
int local
; /* is atom in local process table? */
1230 OUT
int atom
; /* resulting atom */
1231 IN
VARARG(name
,unicode_str
); /* atom name */
1235 /* Delete an atom */
1236 struct delete_atom_request
1238 REQUEST_HEADER
; /* request header */
1239 IN
int atom
; /* atom handle */
1240 IN
int local
; /* is atom in local process table? */
1245 struct find_atom_request
1247 REQUEST_HEADER
; /* request header */
1248 IN
int local
; /* is atom in local process table? */
1249 OUT
int atom
; /* atom handle */
1250 IN
VARARG(name
,unicode_str
); /* atom name */
1254 /* Get an atom name */
1255 struct get_atom_name_request
1257 REQUEST_HEADER
; /* request header */
1258 IN
int atom
; /* atom handle */
1259 IN
int local
; /* is atom in local process table? */
1260 OUT
int count
; /* atom lock count */
1261 OUT
VARARG(name
,unicode_str
); /* atom name */
1265 /* Init the process atom table */
1266 struct init_atom_table_request
1268 REQUEST_HEADER
; /* request header */
1269 IN
int entries
; /* number of entries */
1273 /* Get the message queue of the current thread */
1274 struct get_msg_queue_request
1276 REQUEST_HEADER
; /* request header */
1277 OUT handle_t handle
; /* handle to the queue */
1280 /* Wake up a message queue */
1281 struct wake_queue_request
1283 REQUEST_HEADER
; /* request header */
1284 IN handle_t handle
; /* handle to the queue */
1285 IN
unsigned int bits
; /* wake bits */
1288 /* Wait for a process to start waiting on input */
1289 struct wait_input_idle_request
1291 REQUEST_HEADER
; /* request header */
1292 IN handle_t handle
; /* process handle */
1293 IN
int timeout
; /* timeout */
1294 OUT handle_t event
; /* handle to idle event */
1297 struct create_serial_request
1299 REQUEST_HEADER
; /* request header */
1300 IN
unsigned int access
; /* wanted access rights */
1301 IN
int inherit
; /* inherit flag */
1302 IN
unsigned int sharing
; /* sharing flags */
1303 OUT handle_t handle
; /* handle to the port */
1304 IN
VARARG(name
,string
); /* file name */
1307 struct get_serial_info_request
1309 REQUEST_HEADER
; /* request header */
1310 IN handle_t handle
; /* handle to comm port */
1311 OUT
unsigned int readinterval
;
1312 OUT
unsigned int readconst
;
1313 OUT
unsigned int readmult
;
1314 OUT
unsigned int writeconst
;
1315 OUT
unsigned int writemult
;
1316 OUT
unsigned int eventmask
;
1317 OUT
unsigned int commerror
;
1320 struct set_serial_info_request
1322 REQUEST_HEADER
; /* request header */
1323 IN handle_t handle
; /* handle to comm port */
1324 IN
int flags
; /* bitmask to set values (see below) */
1325 IN
unsigned int readinterval
;
1326 IN
unsigned int readconst
;
1327 IN
unsigned int readmult
;
1328 IN
unsigned int writeconst
;
1329 IN
unsigned int writemult
;
1330 IN
unsigned int eventmask
;
1331 IN
unsigned int commerror
;
1333 #define SERIALINFO_SET_TIMEOUTS 0x01
1334 #define SERIALINFO_SET_MASK 0x02
1335 #define SERIALINFO_SET_ERROR 0x04
1337 struct create_async_request
1339 REQUEST_HEADER
; /* request header */
1340 IN handle_t file_handle
; /* handle to comm port */
1341 IN
void* overlapped
;
1346 OUT handle_t ov_handle
;
1348 #define ASYNC_TYPE_READ 0x01
1349 #define ASYNC_TYPE_WRITE 0x02
1350 #define ASYNC_TYPE_WAIT 0x03
1353 * Used by service thread to tell the server that the current
1354 * operation has completed
1356 struct async_result_request
1358 REQUEST_HEADER
; /* request header */
1359 IN handle_t ov_handle
;
1360 IN
int result
; /* NT status code */
1363 /* Everything below this line is generated automatically by tools/make_requests */
1364 /* ### make_requests begin ### */
1369 REQ_GET_NEW_PROCESS_INFO
,
1373 REQ_INIT_PROCESS_DONE
,
1375 REQ_GET_THREAD_BUFFER
,
1376 REQ_TERMINATE_PROCESS
,
1377 REQ_TERMINATE_THREAD
,
1378 REQ_GET_PROCESS_INFO
,
1379 REQ_SET_PROCESS_INFO
,
1380 REQ_GET_THREAD_INFO
,
1381 REQ_SET_THREAD_INFO
,
1389 REQ_SET_HANDLE_INFO
,
1399 REQ_CREATE_SEMAPHORE
,
1400 REQ_RELEASE_SEMAPHORE
,
1403 REQ_ALLOC_FILE_HANDLE
,
1405 REQ_SET_FILE_POINTER
,
1415 REQ_SET_SOCKET_EVENT
,
1416 REQ_GET_SOCKET_EVENT
,
1417 REQ_ENABLE_SOCKET_EVENT
,
1422 REQ_GET_CONSOLE_MODE
,
1423 REQ_SET_CONSOLE_MODE
,
1424 REQ_SET_CONSOLE_INFO
,
1425 REQ_GET_CONSOLE_INFO
,
1426 REQ_WRITE_CONSOLE_INPUT
,
1427 REQ_READ_CONSOLE_INPUT
,
1428 REQ_CREATE_CHANGE_NOTIFICATION
,
1431 REQ_GET_MAPPING_INFO
,
1433 REQ_CREATE_SNAPSHOT
,
1437 REQ_WAIT_DEBUG_EVENT
,
1438 REQ_QUEUE_EXCEPTION_EVENT
,
1439 REQ_GET_EXCEPTION_STATUS
,
1440 REQ_OUTPUT_DEBUG_STRING
,
1441 REQ_CONTINUE_DEBUG_EVENT
,
1443 REQ_READ_PROCESS_MEMORY
,
1444 REQ_WRITE_PROCESS_MEMORY
,
1452 REQ_DELETE_KEY_VALUE
,
1455 REQ_SAVE_REGISTRY_ATEXIT
,
1456 REQ_SET_REGISTRY_LEVELS
,
1461 REQ_GET_THREAD_CONTEXT
,
1462 REQ_SET_THREAD_CONTEXT
,
1463 REQ_GET_SELECTOR_ENTRY
,
1468 REQ_INIT_ATOM_TABLE
,
1471 REQ_WAIT_INPUT_IDLE
,
1473 REQ_GET_SERIAL_INFO
,
1474 REQ_SET_SERIAL_INFO
,
1480 union generic_request
1482 struct request_max_size max_size
;
1483 struct request_header header
;
1484 struct new_process_request new_process
;
1485 struct get_new_process_info_request get_new_process_info
;
1486 struct new_thread_request new_thread
;
1487 struct boot_done_request boot_done
;
1488 struct init_process_request init_process
;
1489 struct init_process_done_request init_process_done
;
1490 struct init_thread_request init_thread
;
1491 struct get_thread_buffer_request get_thread_buffer
;
1492 struct terminate_process_request terminate_process
;
1493 struct terminate_thread_request terminate_thread
;
1494 struct get_process_info_request get_process_info
;
1495 struct set_process_info_request set_process_info
;
1496 struct get_thread_info_request get_thread_info
;
1497 struct set_thread_info_request set_thread_info
;
1498 struct suspend_thread_request suspend_thread
;
1499 struct resume_thread_request resume_thread
;
1500 struct load_dll_request load_dll
;
1501 struct unload_dll_request unload_dll
;
1502 struct queue_apc_request queue_apc
;
1503 struct get_apc_request get_apc
;
1504 struct close_handle_request close_handle
;
1505 struct set_handle_info_request set_handle_info
;
1506 struct dup_handle_request dup_handle
;
1507 struct open_process_request open_process
;
1508 struct select_request select
;
1509 struct create_event_request create_event
;
1510 struct event_op_request event_op
;
1511 struct open_event_request open_event
;
1512 struct create_mutex_request create_mutex
;
1513 struct release_mutex_request release_mutex
;
1514 struct open_mutex_request open_mutex
;
1515 struct create_semaphore_request create_semaphore
;
1516 struct release_semaphore_request release_semaphore
;
1517 struct open_semaphore_request open_semaphore
;
1518 struct create_file_request create_file
;
1519 struct alloc_file_handle_request alloc_file_handle
;
1520 struct get_handle_fd_request get_handle_fd
;
1521 struct set_file_pointer_request set_file_pointer
;
1522 struct truncate_file_request truncate_file
;
1523 struct set_file_time_request set_file_time
;
1524 struct flush_file_request flush_file
;
1525 struct get_file_info_request get_file_info
;
1526 struct lock_file_request lock_file
;
1527 struct unlock_file_request unlock_file
;
1528 struct create_pipe_request create_pipe
;
1529 struct create_socket_request create_socket
;
1530 struct accept_socket_request accept_socket
;
1531 struct set_socket_event_request set_socket_event
;
1532 struct get_socket_event_request get_socket_event
;
1533 struct enable_socket_event_request enable_socket_event
;
1534 struct alloc_console_request alloc_console
;
1535 struct free_console_request free_console
;
1536 struct open_console_request open_console
;
1537 struct set_console_fd_request set_console_fd
;
1538 struct get_console_mode_request get_console_mode
;
1539 struct set_console_mode_request set_console_mode
;
1540 struct set_console_info_request set_console_info
;
1541 struct get_console_info_request get_console_info
;
1542 struct write_console_input_request write_console_input
;
1543 struct read_console_input_request read_console_input
;
1544 struct create_change_notification_request create_change_notification
;
1545 struct create_mapping_request create_mapping
;
1546 struct open_mapping_request open_mapping
;
1547 struct get_mapping_info_request get_mapping_info
;
1548 struct create_device_request create_device
;
1549 struct create_snapshot_request create_snapshot
;
1550 struct next_process_request next_process
;
1551 struct next_thread_request next_thread
;
1552 struct next_module_request next_module
;
1553 struct wait_debug_event_request wait_debug_event
;
1554 struct queue_exception_event_request queue_exception_event
;
1555 struct get_exception_status_request get_exception_status
;
1556 struct output_debug_string_request output_debug_string
;
1557 struct continue_debug_event_request continue_debug_event
;
1558 struct debug_process_request debug_process
;
1559 struct read_process_memory_request read_process_memory
;
1560 struct write_process_memory_request write_process_memory
;
1561 struct create_key_request create_key
;
1562 struct open_key_request open_key
;
1563 struct delete_key_request delete_key
;
1564 struct enum_key_request enum_key
;
1565 struct set_key_value_request set_key_value
;
1566 struct get_key_value_request get_key_value
;
1567 struct enum_key_value_request enum_key_value
;
1568 struct delete_key_value_request delete_key_value
;
1569 struct load_registry_request load_registry
;
1570 struct save_registry_request save_registry
;
1571 struct save_registry_atexit_request save_registry_atexit
;
1572 struct set_registry_levels_request set_registry_levels
;
1573 struct create_timer_request create_timer
;
1574 struct open_timer_request open_timer
;
1575 struct set_timer_request set_timer
;
1576 struct cancel_timer_request cancel_timer
;
1577 struct get_thread_context_request get_thread_context
;
1578 struct set_thread_context_request set_thread_context
;
1579 struct get_selector_entry_request get_selector_entry
;
1580 struct add_atom_request add_atom
;
1581 struct delete_atom_request delete_atom
;
1582 struct find_atom_request find_atom
;
1583 struct get_atom_name_request get_atom_name
;
1584 struct init_atom_table_request init_atom_table
;
1585 struct get_msg_queue_request get_msg_queue
;
1586 struct wake_queue_request wake_queue
;
1587 struct wait_input_idle_request wait_input_idle
;
1588 struct create_serial_request create_serial
;
1589 struct get_serial_info_request get_serial_info
;
1590 struct set_serial_info_request set_serial_info
;
1591 struct create_async_request create_async
;
1592 struct async_result_request async_result
;
1595 #define SERVER_PROTOCOL_VERSION 36
1597 /* ### make_requests end ### */
1598 /* Everything above this line is generated automatically by tools/make_requests */
1600 #undef REQUEST_HEADER
1603 /* format of the server buffer */
1604 struct server_buffer_info
1606 volatile unsigned int cur_req
; /* offset of the current request */
1607 volatile unsigned int cur_pos
; /* first available position in buffer */
1610 /* client-side functions */
1612 #ifndef __WINE_SERVER__
1616 #include "wine/exception.h"
1618 /* client communication functions */
1620 extern unsigned int wine_server_call( enum request req
);
1621 extern unsigned int server_call_fd( enum request req
, int fd_out
);
1622 extern void server_protocol_error( const char *err
, ... ) WINE_NORETURN
;
1623 extern void *wine_server_alloc_req( size_t fixed_size
, size_t var_size
);
1624 extern int wine_server_recv_fd( int handle
, int cache
);
1625 extern const char *get_config_dir(void);
1627 /* compatibility macros */
1628 #define server_alloc_req(f,v) wine_server_alloc_req(f,v)
1629 #define server_call_noerr(req) wine_server_call(req)
1631 /* do a server call and set the last error code */
1632 inline static unsigned int server_call( enum request req
)
1634 unsigned int res
= wine_server_call( req
);
1635 if (res
) SetLastError( RtlNtStatusToDosError(res
) );
1639 /* get a pointer to the variable part of the request */
1640 inline static void *server_data_ptr( const void *req
)
1642 return (union generic_request
*)req
+ 1;
1645 /* get the size of the variable part of the request */
1646 inline static size_t server_data_size( const void *req
)
1648 return ((struct request_header
*)req
)->var_size
;
1652 /* exception support for server calls */
1654 extern DWORD
__wine_server_exception_handler( PEXCEPTION_RECORD record
, EXCEPTION_FRAME
*frame
,
1655 CONTEXT
*context
, EXCEPTION_FRAME
**pdispatcher
);
1657 struct __server_exception_frame
1659 EXCEPTION_FRAME frame
;
1660 struct server_buffer_info info
; /* saved buffer information */
1663 #define SERVER_START_REQ \
1665 struct __server_exception_frame __f; \
1666 __f.frame.Handler = __wine_server_exception_handler; \
1667 __f.info = *NtCurrentTeb()->buffer_info; \
1668 __wine_push_frame( &__f.frame ); \
1671 #define SERVER_END_REQ \
1673 *NtCurrentTeb()->buffer_info = __f.info; \
1674 __wine_pop_frame( &__f.frame ); \
1677 extern int CLIENT_InitServer(void);
1678 extern int CLIENT_BootDone( int debug_level
);
1679 extern int CLIENT_IsBootThread(void);
1680 extern int CLIENT_InitThread(void);
1681 #endif /* __WINE_SERVER__ */
1683 #endif /* __WINE_SERVER_H */