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 var_offset
; /* offset of the variable 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 create_flags
; /* creation flags */
180 OUT
int start_flags
; /* flags from startup info */
181 OUT
unsigned int server_start
; /* server start time (GetTickCount) */
182 OUT handle_t exe_file
; /* file handle for main exe */
183 OUT handle_t hstdin
; /* handle for stdin */
184 OUT handle_t hstdout
; /* handle for stdout */
185 OUT handle_t hstderr
; /* handle for stderr */
186 OUT
int cmd_show
; /* main window show mode */
187 OUT
VARARG(filename
,string
); /* file name of main exe */
191 /* Signal the end of the process initialization */
192 struct init_process_done_request
194 REQUEST_HEADER
; /* request header */
195 IN
void* module
; /* main module base address */
196 IN
void* entry
; /* process entry point */
197 IN
void* name
; /* ptr to ptr to name (in process addr space) */
198 IN handle_t exe_file
; /* file handle for main exe */
199 IN
int gui
; /* is it a GUI process? */
200 OUT
int debugged
; /* being debugged? */
204 /* Initialize a thread; called from the child after fork()/clone() */
205 struct init_thread_request
207 REQUEST_HEADER
; /* request header */
208 IN
int unix_pid
; /* Unix pid of new thread */
209 IN
void* teb
; /* TEB of new thread (in thread address space) */
210 IN
void* entry
; /* thread entry point (in thread address space) */
214 /* Retrieve the thread buffer file descriptor */
215 /* The reply to this request is the first thing a newly */
216 /* created thread gets (without having to request it) */
217 struct get_thread_buffer_request
219 REQUEST_HEADER
; /* request header */
220 OUT
void* pid
; /* process id of the new thread's process */
221 OUT
void* tid
; /* thread id of the new thread */
222 OUT
int boot
; /* is this the boot thread? */
223 OUT
int version
; /* protocol version */
227 /* Terminate a process */
228 struct terminate_process_request
230 REQUEST_HEADER
; /* request header */
231 IN handle_t handle
; /* process handle to terminate */
232 IN
int exit_code
; /* process exit code */
233 OUT
int self
; /* suicide? */
237 /* Terminate a thread */
238 struct terminate_thread_request
240 REQUEST_HEADER
; /* request header */
241 IN handle_t handle
; /* thread handle to terminate */
242 IN
int exit_code
; /* thread exit code */
243 OUT
int self
; /* suicide? */
244 OUT
int last
; /* last thread in this process? */
248 /* Retrieve information about a process */
249 struct get_process_info_request
251 REQUEST_HEADER
; /* request header */
252 IN handle_t handle
; /* process handle */
253 OUT
void* pid
; /* server process id */
254 OUT
int debugged
; /* debugged? */
255 OUT
int exit_code
; /* process exit code */
256 OUT
int priority
; /* priority class */
257 OUT
int process_affinity
; /* process affinity mask */
258 OUT
int system_affinity
; /* system affinity mask */
262 /* Set a process informations */
263 struct set_process_info_request
265 REQUEST_HEADER
; /* request header */
266 IN handle_t handle
; /* process handle */
267 IN
int mask
; /* setting mask (see below) */
268 IN
int priority
; /* priority class */
269 IN
int affinity
; /* affinity mask */
271 #define SET_PROCESS_INFO_PRIORITY 0x01
272 #define SET_PROCESS_INFO_AFFINITY 0x02
275 /* Retrieve information about a thread */
276 struct get_thread_info_request
278 REQUEST_HEADER
; /* request header */
279 IN handle_t handle
; /* thread handle */
280 IN
void* tid_in
; /* thread id (optional) */
281 OUT
void* tid
; /* server thread id */
282 OUT
void* teb
; /* thread teb pointer */
283 OUT
int exit_code
; /* thread exit code */
284 OUT
int priority
; /* thread priority level */
288 /* Set a thread informations */
289 struct set_thread_info_request
291 REQUEST_HEADER
; /* request header */
292 IN handle_t handle
; /* thread handle */
293 IN
int mask
; /* setting mask (see below) */
294 IN
int priority
; /* priority class */
295 IN
int affinity
; /* affinity mask */
297 #define SET_THREAD_INFO_PRIORITY 0x01
298 #define SET_THREAD_INFO_AFFINITY 0x02
301 /* Suspend a thread */
302 struct suspend_thread_request
304 REQUEST_HEADER
; /* request header */
305 IN handle_t handle
; /* thread handle */
306 OUT
int count
; /* new suspend count */
310 /* Resume a thread */
311 struct resume_thread_request
313 REQUEST_HEADER
; /* request header */
314 IN handle_t handle
; /* thread handle */
315 OUT
int count
; /* new suspend count */
319 /* Notify the server that a dll has been loaded */
320 struct load_dll_request
322 REQUEST_HEADER
; /* request header */
323 IN handle_t handle
; /* file handle */
324 IN
void* base
; /* base address */
325 IN
int dbg_offset
; /* debug info offset */
326 IN
int dbg_size
; /* debug info size */
327 IN
void* name
; /* ptr to ptr to name (in process addr space) */
331 /* Notify the server that a dll is being unloaded */
332 struct unload_dll_request
334 REQUEST_HEADER
; /* request header */
335 IN
void* base
; /* base address */
339 /* Queue an APC for a thread */
340 struct queue_apc_request
342 REQUEST_HEADER
; /* request header */
343 IN handle_t handle
; /* thread handle */
344 IN
int user
; /* user or system apc? */
345 IN
void* func
; /* function to call */
346 IN
void* param
; /* param for function to call */
350 /* Get next APC to call */
351 struct get_apc_request
353 REQUEST_HEADER
; /* request header */
354 IN
int alertable
; /* is thread alertable? */
355 OUT
void* func
; /* function to call */
356 OUT
int type
; /* function type */
357 OUT
VARARG(args
,ptrs
); /* function arguments */
359 enum apc_type
{ APC_NONE
, APC_USER
, APC_TIMER
, APC_ASYNC
};
362 /* Close a handle for the current process */
363 struct close_handle_request
365 REQUEST_HEADER
; /* request header */
366 IN handle_t handle
; /* handle to close */
367 OUT
int fd
; /* associated fd to close */
371 /* Set a handle information */
372 struct set_handle_info_request
374 REQUEST_HEADER
; /* request header */
375 IN handle_t handle
; /* handle we are interested in */
376 IN
int flags
; /* new handle flags */
377 IN
int mask
; /* mask for flags to set */
378 IN
int fd
; /* file descriptor or -1 */
379 OUT
int old_flags
; /* old flag value */
380 OUT
int cur_fd
; /* current file descriptor */
384 /* Duplicate a handle */
385 struct dup_handle_request
387 REQUEST_HEADER
; /* request header */
388 IN handle_t src_process
; /* src process handle */
389 IN handle_t src_handle
; /* src handle to duplicate */
390 IN handle_t dst_process
; /* dst process handle */
391 IN
unsigned int access
; /* wanted access rights */
392 IN
int inherit
; /* inherit flag */
393 IN
int options
; /* duplicate options (see below) */
394 OUT handle_t handle
; /* duplicated handle in dst process */
395 OUT
int fd
; /* associated fd to close */
397 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
398 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
399 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
402 /* Open a handle to a process */
403 struct open_process_request
405 REQUEST_HEADER
; /* request header */
406 IN
void* pid
; /* process id to open */
407 IN
unsigned int access
; /* wanted access rights */
408 IN
int inherit
; /* inherit flag */
409 OUT handle_t handle
; /* handle to the process */
413 /* Wait for handles */
414 struct select_request
416 REQUEST_HEADER
; /* request header */
417 IN
int flags
; /* wait flags (see below) */
418 IN
int sec
; /* absolute timeout */
419 IN
int usec
; /* absolute timeout */
420 OUT
int signaled
; /* signaled handle */
421 IN
VARARG(handles
,handles
); /* handles to select on */
424 #define SELECT_ALERTABLE 2
425 #define SELECT_INTERRUPTIBLE 4
426 #define SELECT_TIMEOUT 8
429 /* Create an event */
430 struct create_event_request
432 REQUEST_HEADER
; /* request header */
433 IN
int manual_reset
; /* manual reset event */
434 IN
int initial_state
; /* initial state of the event */
435 IN
int inherit
; /* inherit flag */
436 OUT handle_t handle
; /* handle to the event */
437 IN
VARARG(name
,unicode_str
); /* object name */
440 /* Event operation */
441 struct event_op_request
443 REQUEST_HEADER
; /* request header */
444 IN handle_t handle
; /* handle to event */
445 IN
int op
; /* event operation (see below) */
447 enum event_op
{ PULSE_EVENT
, SET_EVENT
, RESET_EVENT
};
451 struct open_event_request
453 REQUEST_HEADER
; /* request header */
454 IN
unsigned int access
; /* wanted access rights */
455 IN
int inherit
; /* inherit flag */
456 OUT handle_t handle
; /* handle to the event */
457 IN
VARARG(name
,unicode_str
); /* object name */
462 struct create_mutex_request
464 REQUEST_HEADER
; /* request header */
465 IN
int owned
; /* initially owned? */
466 IN
int inherit
; /* inherit flag */
467 OUT handle_t handle
; /* handle to the mutex */
468 IN
VARARG(name
,unicode_str
); /* object name */
472 /* Release a mutex */
473 struct release_mutex_request
475 REQUEST_HEADER
; /* request header */
476 IN handle_t handle
; /* handle to the mutex */
481 struct open_mutex_request
483 REQUEST_HEADER
; /* request header */
484 IN
unsigned int access
; /* wanted access rights */
485 IN
int inherit
; /* inherit flag */
486 OUT handle_t handle
; /* handle to the mutex */
487 IN
VARARG(name
,unicode_str
); /* object name */
491 /* Create a semaphore */
492 struct create_semaphore_request
494 REQUEST_HEADER
; /* request header */
495 IN
unsigned int initial
; /* initial count */
496 IN
unsigned int max
; /* maximum count */
497 IN
int inherit
; /* inherit flag */
498 OUT handle_t handle
; /* handle to the semaphore */
499 IN
VARARG(name
,unicode_str
); /* object name */
503 /* Release a semaphore */
504 struct release_semaphore_request
506 REQUEST_HEADER
; /* request header */
507 IN handle_t handle
; /* handle to the semaphore */
508 IN
unsigned int count
; /* count to add to semaphore */
509 OUT
unsigned int prev_count
; /* previous semaphore count */
513 /* Open a semaphore */
514 struct open_semaphore_request
516 REQUEST_HEADER
; /* request header */
517 IN
unsigned int access
; /* wanted access rights */
518 IN
int inherit
; /* inherit flag */
519 OUT handle_t handle
; /* handle to the semaphore */
520 IN
VARARG(name
,unicode_str
); /* object name */
525 struct create_file_request
527 REQUEST_HEADER
; /* request header */
528 IN
unsigned int access
; /* wanted access rights */
529 IN
int inherit
; /* inherit flag */
530 IN
unsigned int sharing
; /* sharing flags */
531 IN
int create
; /* file create action */
532 IN
unsigned int attrs
; /* file attributes for creation */
533 OUT handle_t handle
; /* handle to the file */
534 IN
VARARG(filename
,string
); /* file name */
538 /* Allocate a file handle for a Unix fd */
539 struct alloc_file_handle_request
541 REQUEST_HEADER
; /* request header */
542 IN
unsigned int access
; /* wanted access rights */
543 OUT handle_t handle
; /* handle to the file */
547 /* Get a Unix fd to access a file */
548 struct get_handle_fd_request
550 REQUEST_HEADER
; /* request header */
551 IN handle_t handle
; /* handle to the file */
552 IN
unsigned int access
; /* wanted access rights */
553 OUT
int fd
; /* file descriptor */
557 /* Set a file current position */
558 struct set_file_pointer_request
560 REQUEST_HEADER
; /* request header */
561 IN handle_t handle
; /* handle to the file */
562 IN
int low
; /* position low word */
563 IN
int high
; /* position high word */
564 IN
int whence
; /* whence to seek */
565 OUT
int new_low
; /* new position low word */
566 OUT
int new_high
; /* new position high word */
570 /* Truncate (or extend) a file */
571 struct truncate_file_request
573 REQUEST_HEADER
; /* request header */
574 IN handle_t handle
; /* handle to the file */
578 /* Set a file access and modification times */
579 struct set_file_time_request
581 REQUEST_HEADER
; /* request header */
582 IN handle_t handle
; /* handle to the file */
583 IN
time_t access_time
; /* last access time */
584 IN
time_t write_time
; /* last write time */
588 /* Flush a file buffers */
589 struct flush_file_request
591 REQUEST_HEADER
; /* request header */
592 IN handle_t handle
; /* handle to the file */
596 /* Get information about a file */
597 struct get_file_info_request
599 REQUEST_HEADER
; /* request header */
600 IN handle_t handle
; /* handle to the file */
601 OUT
int type
; /* file type */
602 OUT
int attr
; /* file attributes */
603 OUT
time_t access_time
; /* last access time */
604 OUT
time_t write_time
; /* last write time */
605 OUT
int size_high
; /* file size */
606 OUT
int size_low
; /* file size */
607 OUT
int links
; /* number of links */
608 OUT
int index_high
; /* unique index */
609 OUT
int index_low
; /* unique index */
610 OUT
unsigned int serial
; /* volume serial number */
614 /* Lock a region of a file */
615 struct lock_file_request
617 REQUEST_HEADER
; /* request header */
618 IN handle_t handle
; /* handle to the file */
619 IN
unsigned int offset_low
; /* offset of start of lock */
620 IN
unsigned int offset_high
; /* offset of start of lock */
621 IN
unsigned int count_low
; /* count of bytes to lock */
622 IN
unsigned int count_high
; /* count of bytes to lock */
626 /* Unlock a region of a file */
627 struct unlock_file_request
629 REQUEST_HEADER
; /* request header */
630 IN handle_t handle
; /* handle to the file */
631 IN
unsigned int offset_low
; /* offset of start of unlock */
632 IN
unsigned int offset_high
; /* offset of start of unlock */
633 IN
unsigned int count_low
; /* count of bytes to unlock */
634 IN
unsigned int count_high
; /* count of bytes to unlock */
638 /* Create an anonymous pipe */
639 struct create_pipe_request
641 REQUEST_HEADER
; /* request header */
642 IN
int inherit
; /* inherit flag */
643 OUT handle_t handle_read
; /* handle to the read-side of the pipe */
644 OUT handle_t handle_write
; /* handle to the write-side of the pipe */
648 /* Create a socket */
649 struct create_socket_request
651 REQUEST_HEADER
; /* request header */
652 IN
unsigned int access
; /* wanted access rights */
653 IN
int inherit
; /* inherit flag */
654 IN
int family
; /* family, see socket manpage */
655 IN
int type
; /* type, see socket manpage */
656 IN
int protocol
; /* protocol, see socket manpage */
657 OUT handle_t handle
; /* handle to the new socket */
661 /* Accept a socket */
662 struct accept_socket_request
664 REQUEST_HEADER
; /* request header */
665 IN handle_t lhandle
; /* handle to the listening socket */
666 IN
unsigned int access
; /* wanted access rights */
667 IN
int inherit
; /* inherit flag */
668 OUT handle_t handle
; /* handle to the new socket */
672 /* Set socket event parameters */
673 struct set_socket_event_request
675 REQUEST_HEADER
; /* request header */
676 IN handle_t handle
; /* handle to the socket */
677 IN
unsigned int mask
; /* event mask */
678 IN handle_t event
; /* event object */
682 /* Get socket event parameters */
683 struct get_socket_event_request
685 REQUEST_HEADER
; /* request header */
686 IN handle_t handle
; /* handle to the socket */
687 IN
int service
; /* clear pending? */
688 IN handle_t s_event
; /* "expected" event object */
689 IN handle_t c_event
; /* event to clear */
690 OUT
unsigned int mask
; /* event mask */
691 OUT
unsigned int pmask
; /* pending events */
692 OUT
unsigned int state
; /* status bits */
693 OUT
VARARG(errors
,ints
); /* event errors */
697 /* Reenable pending socket events */
698 struct enable_socket_event_request
700 REQUEST_HEADER
; /* request header */
701 IN handle_t handle
; /* handle to the socket */
702 IN
unsigned int mask
; /* events to re-enable */
703 IN
unsigned int sstate
; /* status bits to set */
704 IN
unsigned int cstate
; /* status bits to clear */
708 /* Allocate a console for the current process */
709 struct alloc_console_request
711 REQUEST_HEADER
; /* request header */
712 IN
unsigned int access
; /* wanted access rights */
713 IN
int inherit
; /* inherit flag */
714 OUT handle_t handle_in
; /* handle to console input */
715 OUT handle_t handle_out
; /* handle to console output */
719 /* Free the console of the current process */
720 struct free_console_request
722 REQUEST_HEADER
; /* request header */
726 /* Open a handle to the process console */
727 struct open_console_request
729 REQUEST_HEADER
; /* request header */
730 IN
int output
; /* input or output? */
731 IN
unsigned int access
; /* wanted access rights */
732 IN
int inherit
; /* inherit flag */
733 OUT handle_t handle
; /* handle to the console */
737 /* Set a console file descriptor */
738 struct set_console_fd_request
740 REQUEST_HEADER
; /* request header */
741 IN handle_t handle
; /* handle to the console */
742 IN handle_t handle_in
; /* handle of file to use as input */
743 IN handle_t handle_out
; /* handle of file to use as output */
744 IN
int pid
; /* pid of xterm (hack) */
748 /* Get a console mode (input or output) */
749 struct get_console_mode_request
751 REQUEST_HEADER
; /* request header */
752 IN handle_t handle
; /* handle to the console */
753 OUT
int mode
; /* console mode */
757 /* Set a console mode (input or output) */
758 struct set_console_mode_request
760 REQUEST_HEADER
; /* request header */
761 IN handle_t handle
; /* handle to the console */
762 IN
int mode
; /* console mode */
766 /* Set info about a console (output only) */
767 struct set_console_info_request
769 REQUEST_HEADER
; /* request header */
770 IN handle_t handle
; /* handle to the console */
771 IN
int mask
; /* setting mask (see below) */
772 IN
int cursor_size
; /* size of cursor (percentage filled) */
773 IN
int cursor_visible
;/* cursor visibility flag */
774 IN
VARARG(title
,string
); /* console title */
776 #define SET_CONSOLE_INFO_CURSOR 0x01
777 #define SET_CONSOLE_INFO_TITLE 0x02
779 /* Get info about a console (output only) */
780 struct get_console_info_request
782 REQUEST_HEADER
; /* request header */
783 IN handle_t handle
; /* handle to the console */
784 OUT
int cursor_size
; /* size of cursor (percentage filled) */
785 OUT
int cursor_visible
;/* cursor visibility flag */
786 OUT
int pid
; /* pid of xterm (hack) */
787 OUT
VARARG(title
,string
); /* console title */
791 /* Add input records to a console input queue */
792 struct write_console_input_request
794 REQUEST_HEADER
; /* request header */
795 IN handle_t handle
; /* handle to the console input */
796 OUT
int written
; /* number of records written */
797 IN
VARARG(rec
,input_records
); /* input records */
800 /* Fetch input records from a console input queue */
801 struct read_console_input_request
803 REQUEST_HEADER
; /* request header */
804 IN handle_t handle
; /* handle to the console input */
805 IN
int flush
; /* flush the retrieved records from the queue? */
806 OUT
int read
; /* number of records read */
807 OUT
VARARG(rec
,input_records
); /* input records */
811 /* Create a change notification */
812 struct create_change_notification_request
814 REQUEST_HEADER
; /* request header */
815 IN
int subtree
; /* watch all the subtree */
816 IN
int filter
; /* notification filter */
817 OUT handle_t handle
; /* handle to the change notification */
821 /* Create a file mapping */
822 struct create_mapping_request
824 REQUEST_HEADER
; /* request header */
825 IN
int size_high
; /* mapping size */
826 IN
int size_low
; /* mapping size */
827 IN
int protect
; /* protection flags (see below) */
828 IN
int inherit
; /* inherit flag */
829 IN handle_t file_handle
; /* file handle */
830 OUT handle_t handle
; /* handle to the mapping */
831 IN
VARARG(name
,unicode_str
); /* object name */
833 /* protection flags */
834 #define VPROT_READ 0x01
835 #define VPROT_WRITE 0x02
836 #define VPROT_EXEC 0x04
837 #define VPROT_WRITECOPY 0x08
838 #define VPROT_GUARD 0x10
839 #define VPROT_NOCACHE 0x20
840 #define VPROT_COMMITTED 0x40
841 #define VPROT_IMAGE 0x80
845 struct open_mapping_request
847 REQUEST_HEADER
; /* request header */
848 IN
unsigned int access
; /* wanted access rights */
849 IN
int inherit
; /* inherit flag */
850 OUT handle_t handle
; /* handle to the mapping */
851 IN
VARARG(name
,unicode_str
); /* object name */
855 /* Get information about a file mapping */
856 struct get_mapping_info_request
858 REQUEST_HEADER
; /* request header */
859 IN handle_t handle
; /* handle to the mapping */
860 OUT
int size_high
; /* mapping size */
861 OUT
int size_low
; /* mapping size */
862 OUT
int protect
; /* protection flags */
863 OUT
int header_size
; /* header size (for VPROT_IMAGE mapping) */
864 OUT
void* base
; /* default base addr (for VPROT_IMAGE mapping) */
865 OUT handle_t shared_file
; /* shared mapping file handle */
866 OUT
int shared_size
; /* shared mapping size */
870 /* Create a device */
871 struct create_device_request
873 REQUEST_HEADER
; /* request header */
874 IN
unsigned int access
; /* wanted access rights */
875 IN
int inherit
; /* inherit flag */
876 IN
int id
; /* client private id */
877 OUT handle_t handle
; /* handle to the device */
881 /* Create a snapshot */
882 struct create_snapshot_request
884 REQUEST_HEADER
; /* request header */
885 IN
int inherit
; /* inherit flag */
886 IN
int flags
; /* snapshot flags (TH32CS_*) */
887 IN
void* pid
; /* process id */
888 OUT handle_t handle
; /* handle to the snapshot */
892 /* Get the next process from a snapshot */
893 struct next_process_request
895 REQUEST_HEADER
; /* request header */
896 IN handle_t handle
; /* handle to the snapshot */
897 IN
int reset
; /* reset snapshot position? */
898 OUT
int count
; /* process usage count */
899 OUT
void* pid
; /* process id */
900 OUT
int threads
; /* number of threads */
901 OUT
int priority
; /* process priority */
905 /* Get the next thread from a snapshot */
906 struct next_thread_request
908 REQUEST_HEADER
; /* request header */
909 IN handle_t handle
; /* handle to the snapshot */
910 IN
int reset
; /* reset snapshot position? */
911 OUT
int count
; /* thread usage count */
912 OUT
void* pid
; /* process id */
913 OUT
void* tid
; /* thread id */
914 OUT
int base_pri
; /* base priority */
915 OUT
int delta_pri
; /* delta priority */
919 /* Get the next module from a snapshot */
920 struct next_module_request
922 REQUEST_HEADER
; /* request header */
923 IN handle_t handle
; /* handle to the snapshot */
924 IN
int reset
; /* reset snapshot position? */
925 OUT
void* pid
; /* process id */
926 OUT
void* base
; /* module base address */
930 /* Wait for a debug event */
931 struct wait_debug_event_request
933 REQUEST_HEADER
; /* request header */
934 IN
int get_handle
; /* should we alloc a handle for waiting? */
935 OUT
void* pid
; /* process id */
936 OUT
void* tid
; /* thread id */
937 OUT handle_t wait
; /* wait handle if no event ready */
938 OUT
VARARG(event
,debug_event
); /* debug event data */
942 /* Queue an exception event */
943 struct queue_exception_event_request
945 REQUEST_HEADER
; /* request header */
946 IN
int first
; /* first chance exception? */
947 OUT handle_t handle
; /* handle to the queued event */
948 IN
VARARG(record
,exc_event
); /* thread context followed by exception record */
952 /* Retrieve the status of an exception event */
953 struct get_exception_status_request
955 REQUEST_HEADER
; /* request header */
956 OUT handle_t handle
; /* handle to the queued event */
957 OUT
int status
; /* event continuation status */
958 OUT
VARARG(context
,context
); /* modified thread context */
962 /* Send an output string to the debugger */
963 struct output_debug_string_request
965 REQUEST_HEADER
; /* request header */
966 IN
void* string
; /* string to display (in debugged process address space) */
967 IN
int unicode
; /* is it Unicode? */
968 IN
int length
; /* string length */
972 /* Continue a debug event */
973 struct continue_debug_event_request
975 REQUEST_HEADER
; /* request header */
976 IN
void* pid
; /* process id to continue */
977 IN
void* tid
; /* thread id to continue */
978 IN
int status
; /* continuation status */
982 /* Start debugging an existing process */
983 struct debug_process_request
985 REQUEST_HEADER
; /* request header */
986 IN
void* pid
; /* id of the process to debug */
990 /* Read data from a process address space */
991 struct read_process_memory_request
993 REQUEST_HEADER
; /* request header */
994 IN handle_t handle
; /* process handle */
995 IN
void* addr
; /* addr to read from (must be int-aligned) */
996 IN
int len
; /* number of ints to read */
997 OUT
VARARG(data
,bytes
); /* result data */
1001 /* Write data to a process address space */
1002 struct write_process_memory_request
1004 REQUEST_HEADER
; /* request header */
1005 IN handle_t handle
; /* process handle */
1006 IN
void* addr
; /* addr to write to (must be int-aligned) */
1007 IN
int len
; /* number of ints to write */
1008 IN
unsigned int first_mask
; /* mask for first word */
1009 IN
unsigned int last_mask
; /* mask for last word */
1010 IN
VARARG(data
,bytes
); /* result data */
1014 /* Create a registry key */
1015 struct create_key_request
1017 REQUEST_HEADER
; /* request header */
1018 IN handle_t parent
; /* handle to the parent key */
1019 IN
unsigned int access
; /* desired access rights */
1020 IN
unsigned int options
; /* creation options */
1021 IN
time_t modif
; /* last modification time */
1022 OUT handle_t hkey
; /* handle to the created key */
1023 OUT
int created
; /* has it been newly created? */
1024 IN
VARARG(name
,unicode_len_str
); /* key name */
1025 IN
VARARG(class,unicode_str
); /* class name */
1028 /* Open a registry key */
1029 struct open_key_request
1031 REQUEST_HEADER
; /* request header */
1032 IN handle_t parent
; /* handle to the parent key */
1033 IN
unsigned int access
; /* desired access rights */
1034 OUT handle_t hkey
; /* handle to the open key */
1035 IN
VARARG(name
,unicode_str
); /* key name */
1039 /* Delete a registry key */
1040 struct delete_key_request
1042 REQUEST_HEADER
; /* request header */
1043 IN handle_t hkey
; /* handle to the key */
1047 /* Enumerate registry subkeys */
1048 struct enum_key_request
1050 REQUEST_HEADER
; /* request header */
1051 IN handle_t hkey
; /* handle to registry key */
1052 IN
int index
; /* index of subkey (or -1 for current key) */
1053 IN
int full
; /* return the full info? */
1054 OUT
int subkeys
; /* number of subkeys */
1055 OUT
int max_subkey
; /* longest subkey name */
1056 OUT
int max_class
; /* longest class name */
1057 OUT
int values
; /* number of values */
1058 OUT
int max_value
; /* longest value name */
1059 OUT
int max_data
; /* longest value data */
1060 OUT
time_t modif
; /* last modification time */
1061 OUT
VARARG(name
,unicode_len_str
); /* key name */
1062 OUT
VARARG(class,unicode_str
); /* class name */
1066 /* Set a value of a registry key */
1067 struct set_key_value_request
1069 REQUEST_HEADER
; /* request header */
1070 IN handle_t hkey
; /* handle to registry key */
1071 IN
int type
; /* value type */
1072 IN
unsigned int total
; /* total value len */
1073 IN
unsigned int offset
; /* offset for setting data */
1074 IN
VARARG(name
,unicode_len_str
); /* value name */
1075 IN
VARARG(data
,bytes
); /* value data */
1079 /* Retrieve the value of a registry key */
1080 struct get_key_value_request
1082 REQUEST_HEADER
; /* request header */
1083 IN handle_t hkey
; /* handle to registry key */
1084 IN
unsigned int offset
; /* offset for getting data */
1085 OUT
int type
; /* value type */
1086 OUT
int len
; /* value data len */
1087 IN
VARARG(name
,unicode_len_str
); /* value name */
1088 OUT
VARARG(data
,bytes
); /* value data */
1092 /* Enumerate a value of a registry key */
1093 struct enum_key_value_request
1095 REQUEST_HEADER
; /* request header */
1096 IN handle_t hkey
; /* handle to registry key */
1097 IN
int index
; /* value index */
1098 IN
unsigned int offset
; /* offset for getting data */
1099 OUT
int type
; /* value type */
1100 OUT
int len
; /* value data len */
1101 OUT
VARARG(name
,unicode_len_str
); /* value name */
1102 OUT
VARARG(data
,bytes
); /* value data */
1106 /* Delete a value of a registry key */
1107 struct delete_key_value_request
1109 REQUEST_HEADER
; /* request header */
1110 IN handle_t hkey
; /* handle to registry key */
1111 IN
VARARG(name
,unicode_str
); /* value name */
1115 /* Load a registry branch from a file */
1116 struct load_registry_request
1118 REQUEST_HEADER
; /* request header */
1119 IN handle_t hkey
; /* root key to load to */
1120 IN handle_t file
; /* file to load from */
1121 IN
VARARG(name
,unicode_str
); /* subkey name */
1125 /* Save a registry branch to a file */
1126 struct save_registry_request
1128 REQUEST_HEADER
; /* request header */
1129 IN handle_t hkey
; /* key to save */
1130 IN handle_t file
; /* file to save to */
1134 /* Save a registry branch at server exit */
1135 struct save_registry_atexit_request
1137 REQUEST_HEADER
; /* request header */
1138 IN handle_t hkey
; /* key to save */
1139 IN
VARARG(file
,string
); /* file to save to */
1143 /* Set the current and saving level for the registry */
1144 struct set_registry_levels_request
1146 REQUEST_HEADER
; /* request header */
1147 IN
int current
; /* new current level */
1148 IN
int saving
; /* new saving level */
1149 IN
int period
; /* duration between periodic saves (milliseconds) */
1153 /* Create a waitable timer */
1154 struct create_timer_request
1156 REQUEST_HEADER
; /* request header */
1157 IN
int inherit
; /* inherit flag */
1158 IN
int manual
; /* manual reset */
1159 OUT handle_t handle
; /* handle to the timer */
1160 IN
VARARG(name
,unicode_str
); /* object name */
1164 /* Open a waitable timer */
1165 struct open_timer_request
1167 REQUEST_HEADER
; /* request header */
1168 IN
unsigned int access
; /* wanted access rights */
1169 IN
int inherit
; /* inherit flag */
1170 OUT handle_t handle
; /* handle to the timer */
1171 IN
VARARG(name
,unicode_str
); /* object name */
1174 /* Set a waitable timer */
1175 struct set_timer_request
1177 REQUEST_HEADER
; /* request header */
1178 IN handle_t handle
; /* handle to the timer */
1179 IN
int sec
; /* next expiration absolute time */
1180 IN
int usec
; /* next expiration absolute time */
1181 IN
int period
; /* timer period in ms */
1182 IN
void* callback
; /* callback function */
1183 IN
void* arg
; /* callback argument */
1186 /* Cancel a waitable timer */
1187 struct cancel_timer_request
1189 REQUEST_HEADER
; /* request header */
1190 IN handle_t handle
; /* handle to the timer */
1194 /* Retrieve the current context of a thread */
1195 struct get_thread_context_request
1197 REQUEST_HEADER
; /* request header */
1198 IN handle_t handle
; /* thread handle */
1199 IN
unsigned int flags
; /* context flags */
1200 OUT
VARARG(context
,context
); /* thread context */
1204 /* Set the current context of a thread */
1205 struct set_thread_context_request
1207 REQUEST_HEADER
; /* request header */
1208 IN handle_t handle
; /* thread handle */
1209 IN
unsigned int flags
; /* context flags */
1210 IN
VARARG(context
,context
); /* thread context */
1214 /* Fetch a selector entry for a thread */
1215 struct get_selector_entry_request
1217 REQUEST_HEADER
; /* request header */
1218 IN handle_t handle
; /* thread handle */
1219 IN
int entry
; /* LDT entry */
1220 OUT
unsigned int base
; /* selector base */
1221 OUT
unsigned int limit
; /* selector limit */
1222 OUT
unsigned char flags
; /* selector flags */
1227 struct add_atom_request
1229 REQUEST_HEADER
; /* request header */
1230 IN
int local
; /* is atom in local process table? */
1231 OUT
int atom
; /* resulting atom */
1232 IN
VARARG(name
,unicode_str
); /* atom name */
1236 /* Delete an atom */
1237 struct delete_atom_request
1239 REQUEST_HEADER
; /* request header */
1240 IN
int atom
; /* atom handle */
1241 IN
int local
; /* is atom in local process table? */
1246 struct find_atom_request
1248 REQUEST_HEADER
; /* request header */
1249 IN
int local
; /* is atom in local process table? */
1250 OUT
int atom
; /* atom handle */
1251 IN
VARARG(name
,unicode_str
); /* atom name */
1255 /* Get an atom name */
1256 struct get_atom_name_request
1258 REQUEST_HEADER
; /* request header */
1259 IN
int atom
; /* atom handle */
1260 IN
int local
; /* is atom in local process table? */
1261 OUT
int count
; /* atom lock count */
1262 OUT
VARARG(name
,unicode_str
); /* atom name */
1266 /* Init the process atom table */
1267 struct init_atom_table_request
1269 REQUEST_HEADER
; /* request header */
1270 IN
int entries
; /* number of entries */
1274 /* Get the message queue of the current thread */
1275 struct get_msg_queue_request
1277 REQUEST_HEADER
; /* request header */
1278 OUT handle_t handle
; /* handle to the queue */
1281 /* Wake up a message queue */
1282 struct wake_queue_request
1284 REQUEST_HEADER
; /* request header */
1285 IN handle_t handle
; /* handle to the queue */
1286 IN
unsigned int bits
; /* wake bits */
1289 /* Wait for a process to start waiting on input */
1290 struct wait_input_idle_request
1292 REQUEST_HEADER
; /* request header */
1293 IN handle_t handle
; /* process handle */
1294 IN
int timeout
; /* timeout */
1295 OUT handle_t event
; /* handle to idle event */
1298 struct create_serial_request
1300 REQUEST_HEADER
; /* request header */
1301 IN
unsigned int access
; /* wanted access rights */
1302 IN
int inherit
; /* inherit flag */
1303 IN
unsigned int sharing
; /* sharing flags */
1304 OUT handle_t handle
; /* handle to the port */
1305 IN
VARARG(name
,string
); /* file name */
1308 struct get_serial_info_request
1310 REQUEST_HEADER
; /* request header */
1311 IN handle_t handle
; /* handle to comm port */
1312 OUT
unsigned int readinterval
;
1313 OUT
unsigned int readconst
;
1314 OUT
unsigned int readmult
;
1315 OUT
unsigned int writeconst
;
1316 OUT
unsigned int writemult
;
1317 OUT
unsigned int eventmask
;
1318 OUT
unsigned int commerror
;
1321 struct set_serial_info_request
1323 REQUEST_HEADER
; /* request header */
1324 IN handle_t handle
; /* handle to comm port */
1325 IN
int flags
; /* bitmask to set values (see below) */
1326 IN
unsigned int readinterval
;
1327 IN
unsigned int readconst
;
1328 IN
unsigned int readmult
;
1329 IN
unsigned int writeconst
;
1330 IN
unsigned int writemult
;
1331 IN
unsigned int eventmask
;
1332 IN
unsigned int commerror
;
1334 #define SERIALINFO_SET_TIMEOUTS 0x01
1335 #define SERIALINFO_SET_MASK 0x02
1336 #define SERIALINFO_SET_ERROR 0x04
1338 struct create_async_request
1340 REQUEST_HEADER
; /* request header */
1341 IN handle_t file_handle
; /* handle to comm port */
1342 IN
void* overlapped
;
1347 OUT handle_t ov_handle
;
1349 #define ASYNC_TYPE_READ 0x01
1350 #define ASYNC_TYPE_WRITE 0x02
1351 #define ASYNC_TYPE_WAIT 0x03
1354 * Used by service thread to tell the server that the current
1355 * operation has completed
1357 struct async_result_request
1359 REQUEST_HEADER
; /* request header */
1360 IN handle_t ov_handle
;
1361 IN
int result
; /* NT status code */
1364 /* Everything below this line is generated automatically by tools/make_requests */
1365 /* ### make_requests begin ### */
1370 REQ_GET_NEW_PROCESS_INFO
,
1374 REQ_INIT_PROCESS_DONE
,
1376 REQ_GET_THREAD_BUFFER
,
1377 REQ_TERMINATE_PROCESS
,
1378 REQ_TERMINATE_THREAD
,
1379 REQ_GET_PROCESS_INFO
,
1380 REQ_SET_PROCESS_INFO
,
1381 REQ_GET_THREAD_INFO
,
1382 REQ_SET_THREAD_INFO
,
1390 REQ_SET_HANDLE_INFO
,
1400 REQ_CREATE_SEMAPHORE
,
1401 REQ_RELEASE_SEMAPHORE
,
1404 REQ_ALLOC_FILE_HANDLE
,
1406 REQ_SET_FILE_POINTER
,
1416 REQ_SET_SOCKET_EVENT
,
1417 REQ_GET_SOCKET_EVENT
,
1418 REQ_ENABLE_SOCKET_EVENT
,
1423 REQ_GET_CONSOLE_MODE
,
1424 REQ_SET_CONSOLE_MODE
,
1425 REQ_SET_CONSOLE_INFO
,
1426 REQ_GET_CONSOLE_INFO
,
1427 REQ_WRITE_CONSOLE_INPUT
,
1428 REQ_READ_CONSOLE_INPUT
,
1429 REQ_CREATE_CHANGE_NOTIFICATION
,
1432 REQ_GET_MAPPING_INFO
,
1434 REQ_CREATE_SNAPSHOT
,
1438 REQ_WAIT_DEBUG_EVENT
,
1439 REQ_QUEUE_EXCEPTION_EVENT
,
1440 REQ_GET_EXCEPTION_STATUS
,
1441 REQ_OUTPUT_DEBUG_STRING
,
1442 REQ_CONTINUE_DEBUG_EVENT
,
1444 REQ_READ_PROCESS_MEMORY
,
1445 REQ_WRITE_PROCESS_MEMORY
,
1453 REQ_DELETE_KEY_VALUE
,
1456 REQ_SAVE_REGISTRY_ATEXIT
,
1457 REQ_SET_REGISTRY_LEVELS
,
1462 REQ_GET_THREAD_CONTEXT
,
1463 REQ_SET_THREAD_CONTEXT
,
1464 REQ_GET_SELECTOR_ENTRY
,
1469 REQ_INIT_ATOM_TABLE
,
1472 REQ_WAIT_INPUT_IDLE
,
1474 REQ_GET_SERIAL_INFO
,
1475 REQ_SET_SERIAL_INFO
,
1481 union generic_request
1483 struct request_max_size max_size
;
1484 struct request_header header
;
1485 struct new_process_request new_process
;
1486 struct get_new_process_info_request get_new_process_info
;
1487 struct new_thread_request new_thread
;
1488 struct boot_done_request boot_done
;
1489 struct init_process_request init_process
;
1490 struct init_process_done_request init_process_done
;
1491 struct init_thread_request init_thread
;
1492 struct get_thread_buffer_request get_thread_buffer
;
1493 struct terminate_process_request terminate_process
;
1494 struct terminate_thread_request terminate_thread
;
1495 struct get_process_info_request get_process_info
;
1496 struct set_process_info_request set_process_info
;
1497 struct get_thread_info_request get_thread_info
;
1498 struct set_thread_info_request set_thread_info
;
1499 struct suspend_thread_request suspend_thread
;
1500 struct resume_thread_request resume_thread
;
1501 struct load_dll_request load_dll
;
1502 struct unload_dll_request unload_dll
;
1503 struct queue_apc_request queue_apc
;
1504 struct get_apc_request get_apc
;
1505 struct close_handle_request close_handle
;
1506 struct set_handle_info_request set_handle_info
;
1507 struct dup_handle_request dup_handle
;
1508 struct open_process_request open_process
;
1509 struct select_request select
;
1510 struct create_event_request create_event
;
1511 struct event_op_request event_op
;
1512 struct open_event_request open_event
;
1513 struct create_mutex_request create_mutex
;
1514 struct release_mutex_request release_mutex
;
1515 struct open_mutex_request open_mutex
;
1516 struct create_semaphore_request create_semaphore
;
1517 struct release_semaphore_request release_semaphore
;
1518 struct open_semaphore_request open_semaphore
;
1519 struct create_file_request create_file
;
1520 struct alloc_file_handle_request alloc_file_handle
;
1521 struct get_handle_fd_request get_handle_fd
;
1522 struct set_file_pointer_request set_file_pointer
;
1523 struct truncate_file_request truncate_file
;
1524 struct set_file_time_request set_file_time
;
1525 struct flush_file_request flush_file
;
1526 struct get_file_info_request get_file_info
;
1527 struct lock_file_request lock_file
;
1528 struct unlock_file_request unlock_file
;
1529 struct create_pipe_request create_pipe
;
1530 struct create_socket_request create_socket
;
1531 struct accept_socket_request accept_socket
;
1532 struct set_socket_event_request set_socket_event
;
1533 struct get_socket_event_request get_socket_event
;
1534 struct enable_socket_event_request enable_socket_event
;
1535 struct alloc_console_request alloc_console
;
1536 struct free_console_request free_console
;
1537 struct open_console_request open_console
;
1538 struct set_console_fd_request set_console_fd
;
1539 struct get_console_mode_request get_console_mode
;
1540 struct set_console_mode_request set_console_mode
;
1541 struct set_console_info_request set_console_info
;
1542 struct get_console_info_request get_console_info
;
1543 struct write_console_input_request write_console_input
;
1544 struct read_console_input_request read_console_input
;
1545 struct create_change_notification_request create_change_notification
;
1546 struct create_mapping_request create_mapping
;
1547 struct open_mapping_request open_mapping
;
1548 struct get_mapping_info_request get_mapping_info
;
1549 struct create_device_request create_device
;
1550 struct create_snapshot_request create_snapshot
;
1551 struct next_process_request next_process
;
1552 struct next_thread_request next_thread
;
1553 struct next_module_request next_module
;
1554 struct wait_debug_event_request wait_debug_event
;
1555 struct queue_exception_event_request queue_exception_event
;
1556 struct get_exception_status_request get_exception_status
;
1557 struct output_debug_string_request output_debug_string
;
1558 struct continue_debug_event_request continue_debug_event
;
1559 struct debug_process_request debug_process
;
1560 struct read_process_memory_request read_process_memory
;
1561 struct write_process_memory_request write_process_memory
;
1562 struct create_key_request create_key
;
1563 struct open_key_request open_key
;
1564 struct delete_key_request delete_key
;
1565 struct enum_key_request enum_key
;
1566 struct set_key_value_request set_key_value
;
1567 struct get_key_value_request get_key_value
;
1568 struct enum_key_value_request enum_key_value
;
1569 struct delete_key_value_request delete_key_value
;
1570 struct load_registry_request load_registry
;
1571 struct save_registry_request save_registry
;
1572 struct save_registry_atexit_request save_registry_atexit
;
1573 struct set_registry_levels_request set_registry_levels
;
1574 struct create_timer_request create_timer
;
1575 struct open_timer_request open_timer
;
1576 struct set_timer_request set_timer
;
1577 struct cancel_timer_request cancel_timer
;
1578 struct get_thread_context_request get_thread_context
;
1579 struct set_thread_context_request set_thread_context
;
1580 struct get_selector_entry_request get_selector_entry
;
1581 struct add_atom_request add_atom
;
1582 struct delete_atom_request delete_atom
;
1583 struct find_atom_request find_atom
;
1584 struct get_atom_name_request get_atom_name
;
1585 struct init_atom_table_request init_atom_table
;
1586 struct get_msg_queue_request get_msg_queue
;
1587 struct wake_queue_request wake_queue
;
1588 struct wait_input_idle_request wait_input_idle
;
1589 struct create_serial_request create_serial
;
1590 struct get_serial_info_request get_serial_info
;
1591 struct set_serial_info_request set_serial_info
;
1592 struct create_async_request create_async
;
1593 struct async_result_request async_result
;
1596 #define SERVER_PROTOCOL_VERSION 38
1598 /* ### make_requests end ### */
1599 /* Everything above this line is generated automatically by tools/make_requests */
1601 #undef REQUEST_HEADER
1604 /* format of the server buffer */
1605 struct server_buffer_info
1607 volatile unsigned int cur_req
; /* offset of the current request */
1608 volatile unsigned int cur_pos
; /* first available position in buffer */
1611 /* client-side functions */
1613 #ifndef __WINE_SERVER__
1617 #include "wine/exception.h"
1619 /* client communication functions */
1621 extern unsigned int wine_server_call( enum request req
);
1622 extern unsigned int server_call_fd( enum request req
, int fd_out
);
1623 extern void server_protocol_error( const char *err
, ... ) WINE_NORETURN
;
1624 extern void server_protocol_perror( const char *err
) WINE_NORETURN
;
1625 extern void *wine_server_alloc_req( size_t fixed_size
, size_t var_size
);
1626 extern int wine_server_recv_fd( int handle
, int cache
);
1627 extern const char *get_config_dir(void);
1629 /* compatibility macros */
1630 #define server_alloc_req(f,v) wine_server_alloc_req(f,v)
1631 #define server_call_noerr(req) wine_server_call(req)
1633 /* do a server call and set the last error code */
1634 inline static unsigned int server_call( enum request req
)
1636 unsigned int res
= wine_server_call( req
);
1637 if (res
) SetLastError( RtlNtStatusToDosError(res
) );
1641 /* get a pointer to the variable part of the request */
1642 inline static void *server_data_ptr( const void *req
)
1644 return (union generic_request
*)req
+ 1;
1647 /* get the size of the variable part of the request */
1648 inline static size_t server_data_size( const void *req
)
1650 return ((struct request_header
*)req
)->var_size
;
1654 /* exception support for server calls */
1656 extern DWORD
__wine_server_exception_handler( PEXCEPTION_RECORD record
, EXCEPTION_FRAME
*frame
,
1657 CONTEXT
*context
, EXCEPTION_FRAME
**pdispatcher
);
1659 struct __server_exception_frame
1661 EXCEPTION_FRAME frame
;
1662 struct server_buffer_info info
; /* saved buffer information */
1665 #define SERVER_START_REQ \
1667 struct __server_exception_frame __f; \
1668 __f.frame.Handler = __wine_server_exception_handler; \
1669 __f.info = *NtCurrentTeb()->buffer_info; \
1670 __wine_push_frame( &__f.frame ); \
1673 #define SERVER_END_REQ \
1675 *NtCurrentTeb()->buffer_info = __f.info; \
1676 __wine_pop_frame( &__f.frame ); \
1679 extern int CLIENT_InitServer(void);
1680 extern int CLIENT_BootDone( int debug_level
);
1681 extern int CLIENT_IsBootThread(void);
1682 extern int CLIENT_InitThread(void);
1683 #endif /* __WINE_SERVER__ */
1685 #endif /* __WINE_SERVER_H */