Added server_call_noerr function that avoids touching the last error.
[wine.git] / include / server.h
blobc00cab87ec983cb906e7bb34320e217ffdebd140
1 /*
2 * Wine server definitions
4 * Copyright (C) 1998 Alexandre Julliard
5 */
7 #ifndef __WINE_SERVER_H
8 #define __WINE_SERVER_H
10 #include <stdlib.h>
11 #include <time.h>
13 /* Request structures */
15 /* Following are the definitions of all the client<->server */
16 /* communication format; if you make any change in this file, */
17 /* you must run tools/make_requests again. */
20 /* These empty macros are used by tools/make_requests */
21 /* to generate the request/reply tracing functions */
22 #define IN /*nothing*/
23 #define OUT /*nothing*/
26 /* Create a new process from the context of the parent */
27 struct new_process_request
29 IN int inherit; /* inherit flag */
30 IN int inherit_all; /* inherit all handles from parent */
31 IN int create_flags; /* creation flags */
32 IN int start_flags; /* flags from startup info */
33 IN int hstdin; /* handle for stdin */
34 IN int hstdout; /* handle for stdout */
35 IN int hstderr; /* handle for stderr */
36 IN int event; /* event to signal startup */
37 IN int cmd_show; /* main window show mode */
38 IN void* env_ptr; /* pointer to environment (FIXME: hack) */
39 OUT void* pid; /* process id */
40 OUT int handle; /* process handle (in the current process) */
41 IN char cmdline[1]; /* command line */
45 /* Create a new thread from the context of the parent */
46 struct new_thread_request
48 IN void* pid; /* process id for the new thread */
49 IN int suspend; /* new thread should be suspended on creation */
50 IN int inherit; /* inherit flag */
51 OUT void* tid; /* thread id */
52 OUT int handle; /* thread handle (in the current process) */
56 /* Set the server debug level */
57 struct set_debug_request
59 IN int level; /* New debug level */
63 /* Initialize a process; called from the new process context */
64 struct init_process_request
66 OUT int start_flags; /* flags from startup info */
67 OUT int hstdin; /* handle for stdin */
68 OUT int hstdout; /* handle for stdout */
69 OUT int hstderr; /* handle for stderr */
70 OUT int cmd_show; /* main window show mode */
71 OUT void* env_ptr; /* pointer to environment (FIXME: hack) */
72 OUT char cmdline[1]; /* command line */
76 /* Signal the end of the process initialization */
77 struct init_process_done_request
79 IN int dummy;
83 /* Initialize a thread; called from the child after fork()/clone() */
84 struct init_thread_request
86 IN int unix_pid; /* Unix pid of new thread */
87 IN void* teb; /* TEB of new thread (in thread address space) */
88 OUT void* pid; /* process id of the new thread's process */
89 OUT void* tid; /* thread id of the new thread */
93 /* Retrieve the thread buffer file descriptor */
94 /* The reply to this request is the first thing a newly */
95 /* created thread gets (without having to request it) */
96 struct get_thread_buffer_request
98 IN int dummy;
102 /* Terminate a process */
103 struct terminate_process_request
105 IN int handle; /* process handle to terminate */
106 IN int exit_code; /* process exit code */
110 /* Terminate a thread */
111 struct terminate_thread_request
113 IN int handle; /* thread handle to terminate */
114 IN int exit_code; /* thread exit code */
118 /* Retrieve information about a process */
119 struct get_process_info_request
121 IN int handle; /* process handle */
122 OUT void* pid; /* server process id */
123 OUT int exit_code; /* process exit code */
124 OUT int priority; /* priority class */
125 OUT int process_affinity; /* process affinity mask */
126 OUT int system_affinity; /* system affinity mask */
130 /* Set a process informations */
131 struct set_process_info_request
133 IN int handle; /* process handle */
134 IN int mask; /* setting mask (see below) */
135 IN int priority; /* priority class */
136 IN int affinity; /* affinity mask */
138 #define SET_PROCESS_INFO_PRIORITY 0x01
139 #define SET_PROCESS_INFO_AFFINITY 0x02
142 /* Retrieve information about a thread */
143 struct get_thread_info_request
145 IN int handle; /* thread handle */
146 OUT void* tid; /* server thread id */
147 OUT int exit_code; /* thread exit code */
148 OUT int priority; /* thread priority level */
152 /* Set a thread informations */
153 struct set_thread_info_request
155 IN int handle; /* thread handle */
156 IN int mask; /* setting mask (see below) */
157 IN int priority; /* priority class */
158 IN int affinity; /* affinity mask */
160 #define SET_THREAD_INFO_PRIORITY 0x01
161 #define SET_THREAD_INFO_AFFINITY 0x02
164 /* Suspend a thread */
165 struct suspend_thread_request
167 IN int handle; /* thread handle */
168 OUT int count; /* new suspend count */
172 /* Resume a thread */
173 struct resume_thread_request
175 IN int handle; /* thread handle */
176 OUT int count; /* new suspend count */
180 /* Debugger support: freeze / unfreeze */
181 struct debugger_request
183 IN int op; /* operation type */
186 enum debugger_op { DEBUGGER_FREEZE_ALL, DEBUGGER_UNFREEZE_ALL };
189 /* Queue an APC for a thread */
190 struct queue_apc_request
192 IN int handle; /* thread handle */
193 IN void* func; /* function to call */
194 IN void* param; /* param for function to call */
198 /* Get list of APC to call */
199 struct get_apcs_request
201 OUT int count; /* number of apcs */
202 OUT void* apcs[1]; /* async procedures to call */
206 /* Close a handle for the current process */
207 struct close_handle_request
209 IN int handle; /* handle to close */
213 /* Get information about a handle */
214 struct get_handle_info_request
216 IN int handle; /* handle we are interested in */
217 OUT int flags; /* handle flags */
221 /* Set a handle information */
222 struct set_handle_info_request
224 IN int handle; /* handle we are interested in */
225 IN int flags; /* new handle flags */
226 IN int mask; /* mask for flags to set */
230 /* Duplicate a handle */
231 struct dup_handle_request
233 IN int src_process; /* src process handle */
234 IN int src_handle; /* src handle to duplicate */
235 IN int dst_process; /* dst process handle */
236 IN unsigned int access; /* wanted access rights */
237 IN int inherit; /* inherit flag */
238 IN int options; /* duplicate options (see below) */
239 OUT int handle; /* duplicated handle in dst process */
241 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
242 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
243 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
246 /* Open a handle to a process */
247 struct open_process_request
249 IN void* pid; /* process id to open */
250 IN unsigned int access; /* wanted access rights */
251 IN int inherit; /* inherit flag */
252 OUT int handle; /* handle to the process */
256 /* Wait for handles */
257 struct select_request
259 IN int count; /* handles count */
260 IN int flags; /* wait flags (see below) */
261 IN int timeout; /* timeout in ms */
262 OUT int signaled; /* signaled handle */
263 IN int handles[1]; /* handles to select on */
265 #define SELECT_ALL 1
266 #define SELECT_ALERTABLE 2
267 #define SELECT_TIMEOUT 4
270 /* Create an event */
271 struct create_event_request
273 IN int manual_reset; /* manual reset event */
274 IN int initial_state; /* initial state of the event */
275 IN int inherit; /* inherit flag */
276 OUT int handle; /* handle to the event */
277 IN char name[1]; /* event name */
280 /* Event operation */
281 struct event_op_request
283 IN int handle; /* handle to event */
284 IN int op; /* event operation (see below) */
286 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
289 /* Open an event */
290 struct open_event_request
292 IN unsigned int access; /* wanted access rights */
293 IN int inherit; /* inherit flag */
294 OUT int handle; /* handle to the event */
295 IN char name[1]; /* object name */
299 /* Create a mutex */
300 struct create_mutex_request
302 IN int owned; /* initially owned? */
303 IN int inherit; /* inherit flag */
304 OUT int handle; /* handle to the mutex */
305 IN char name[1]; /* mutex name */
309 /* Release a mutex */
310 struct release_mutex_request
312 IN int handle; /* handle to the mutex */
316 /* Open a mutex */
317 struct open_mutex_request
319 IN unsigned int access; /* wanted access rights */
320 IN int inherit; /* inherit flag */
321 OUT int handle; /* handle to the mutex */
322 IN char name[1]; /* object name */
326 /* Create a semaphore */
327 struct create_semaphore_request
329 IN unsigned int initial; /* initial count */
330 IN unsigned int max; /* maximum count */
331 IN int inherit; /* inherit flag */
332 OUT int handle; /* handle to the semaphore */
333 IN char name[1]; /* semaphore name */
337 /* Release a semaphore */
338 struct release_semaphore_request
340 IN int handle; /* handle to the semaphore */
341 IN unsigned int count; /* count to add to semaphore */
342 OUT unsigned int prev_count; /* previous semaphore count */
346 /* Open a semaphore */
347 struct open_semaphore_request
349 IN unsigned int access; /* wanted access rights */
350 IN int inherit; /* inherit flag */
351 OUT int handle; /* handle to the semaphore */
352 IN char name[1]; /* object name */
356 /* Create a file */
357 struct create_file_request
359 IN unsigned int access; /* wanted access rights */
360 IN int inherit; /* inherit flag */
361 IN unsigned int sharing; /* sharing flags */
362 IN int create; /* file create action */
363 IN unsigned int attrs; /* file attributes for creation */
364 OUT int handle; /* handle to the file */
365 IN char name[1]; /* file name */
369 /* Allocate a file handle for a Unix fd */
370 struct alloc_file_handle_request
372 IN unsigned int access; /* wanted access rights */
373 OUT int handle; /* handle to the file */
377 /* Get a Unix fd to read from a file */
378 struct get_read_fd_request
380 IN int handle; /* handle to the file */
384 /* Get a Unix fd to write to a file */
385 struct get_write_fd_request
387 IN int handle; /* handle to the file */
391 /* Set a file current position */
392 struct set_file_pointer_request
394 IN int handle; /* handle to the file */
395 IN int low; /* position low word */
396 IN int high; /* position high word */
397 IN int whence; /* whence to seek */
398 OUT int new_low; /* new position low word */
399 OUT int new_high; /* new position high word */
403 /* Truncate (or extend) a file */
404 struct truncate_file_request
406 IN int handle; /* handle to the file */
410 /* Set a file access and modification times */
411 struct set_file_time_request
413 IN int handle; /* handle to the file */
414 IN time_t access_time; /* last access time */
415 IN time_t write_time; /* last write time */
419 /* Flush a file buffers */
420 struct flush_file_request
422 IN int handle; /* handle to the file */
426 /* Get information about a file */
427 struct get_file_info_request
429 IN int handle; /* handle to the file */
430 OUT int type; /* file type */
431 OUT int attr; /* file attributes */
432 OUT time_t access_time; /* last access time */
433 OUT time_t write_time; /* last write time */
434 OUT int size_high; /* file size */
435 OUT int size_low; /* file size */
436 OUT int links; /* number of links */
437 OUT int index_high; /* unique index */
438 OUT int index_low; /* unique index */
439 OUT unsigned int serial; /* volume serial number */
443 /* Lock a region of a file */
444 struct lock_file_request
446 IN int handle; /* handle to the file */
447 IN unsigned int offset_low; /* offset of start of lock */
448 IN unsigned int offset_high; /* offset of start of lock */
449 IN unsigned int count_low; /* count of bytes to lock */
450 IN unsigned int count_high; /* count of bytes to lock */
454 /* Unlock a region of a file */
455 struct unlock_file_request
457 IN int handle; /* handle to the file */
458 IN unsigned int offset_low; /* offset of start of unlock */
459 IN unsigned int offset_high; /* offset of start of unlock */
460 IN unsigned int count_low; /* count of bytes to unlock */
461 IN unsigned int count_high; /* count of bytes to unlock */
465 /* Create an anonymous pipe */
466 struct create_pipe_request
468 IN int inherit; /* inherit flag */
469 OUT int handle_read; /* handle to the read-side of the pipe */
470 OUT int handle_write; /* handle to the write-side of the pipe */
474 /* Create a socket */
475 struct create_socket_request
477 IN unsigned int access; /* wanted access rights */
478 IN int inherit; /* inherit flag */
479 IN int family; /* family, see socket manpage */
480 IN int type; /* type, see socket manpage */
481 IN int protocol; /* protocol, see socket manpage */
482 OUT int handle; /* handle to the new socket */
486 /* Accept a socket */
487 struct accept_socket_request
489 IN int lhandle; /* handle to the listening socket */
490 IN unsigned int access; /* wanted access rights */
491 IN int inherit; /* inherit flag */
492 OUT int handle; /* handle to the new socket */
496 /* Set socket event parameters */
497 struct set_socket_event_request
499 IN int handle; /* handle to the socket */
500 IN unsigned int mask; /* event mask */
501 IN int event; /* event object */
505 /* Get socket event parameters */
506 struct get_socket_event_request
508 IN int handle; /* handle to the socket */
509 IN int service; /* clear pending? */
510 IN int s_event; /* "expected" event object */
511 OUT unsigned int mask; /* event mask */
512 OUT unsigned int pmask; /* pending events */
513 OUT unsigned int state; /* status bits */
514 OUT int errors[1]; /* event errors */
518 /* Reenable pending socket events */
519 struct enable_socket_event_request
521 IN int handle; /* handle to the socket */
522 IN unsigned int mask; /* events to re-enable */
523 IN unsigned int sstate; /* status bits to set */
524 IN unsigned int cstate; /* status bits to clear */
528 /* Allocate a console for the current process */
529 struct alloc_console_request
531 IN unsigned int access; /* wanted access rights */
532 IN int inherit; /* inherit flag */
533 OUT int handle_in; /* handle to console input */
534 OUT int handle_out; /* handle to console output */
538 /* Free the console of the current process */
539 struct free_console_request
541 IN int dummy;
545 /* Open a handle to the process console */
546 struct open_console_request
548 IN int output; /* input or output? */
549 IN unsigned int access; /* wanted access rights */
550 IN int inherit; /* inherit flag */
551 OUT int handle; /* handle to the console */
555 /* Set a console file descriptor */
556 struct set_console_fd_request
558 IN int handle; /* handle to the console */
559 IN int file_handle; /* handle of file to use as file descriptor */
560 IN int pid; /* pid of xterm (hack) */
564 /* Get a console mode (input or output) */
565 struct get_console_mode_request
567 IN int handle; /* handle to the console */
568 OUT int mode; /* console mode */
572 /* Set a console mode (input or output) */
573 struct set_console_mode_request
575 IN int handle; /* handle to the console */
576 IN int mode; /* console mode */
580 /* Set info about a console (output only) */
581 struct set_console_info_request
583 IN int handle; /* handle to the console */
584 IN int mask; /* setting mask (see below) */
585 IN int cursor_size; /* size of cursor (percentage filled) */
586 IN int cursor_visible;/* cursor visibility flag */
587 IN char title[1]; /* console title */
589 #define SET_CONSOLE_INFO_CURSOR 0x01
590 #define SET_CONSOLE_INFO_TITLE 0x02
592 /* Get info about a console (output only) */
593 struct get_console_info_request
595 IN int handle; /* handle to the console */
596 OUT int cursor_size; /* size of cursor (percentage filled) */
597 OUT int cursor_visible;/* cursor visibility flag */
598 OUT int pid; /* pid of xterm (hack) */
599 OUT char title[1]; /* console title */
603 /* Add input records to a console input queue */
604 struct write_console_input_request
606 IN int handle; /* handle to the console input */
607 IN int count; /* number of input records */
608 OUT int written; /* number of records written */
609 /* INPUT_RECORD records[0]; */ /* input records */
612 /* Fetch input records from a console input queue */
613 struct read_console_input_request
615 IN int handle; /* handle to the console input */
616 IN int count; /* max number of records to retrieve */
617 IN int flush; /* flush the retrieved records from the queue? */
618 OUT int read; /* number of records read */
619 /* INPUT_RECORD records[0]; */ /* input records */
623 /* Create a change notification */
624 struct create_change_notification_request
626 IN int subtree; /* watch all the subtree */
627 IN int filter; /* notification filter */
628 OUT int handle; /* handle to the change notification */
632 /* Create a file mapping */
633 struct create_mapping_request
635 IN int size_high; /* mapping size */
636 IN int size_low; /* mapping size */
637 IN int protect; /* protection flags (see below) */
638 IN int inherit; /* inherit flag */
639 IN int file_handle; /* file handle */
640 OUT int handle; /* handle to the mapping */
641 IN char name[1]; /* object name */
643 /* protection flags */
644 #define VPROT_READ 0x01
645 #define VPROT_WRITE 0x02
646 #define VPROT_EXEC 0x04
647 #define VPROT_WRITECOPY 0x08
648 #define VPROT_GUARD 0x10
649 #define VPROT_NOCACHE 0x20
650 #define VPROT_COMMITTED 0x40
653 /* Open a mapping */
654 struct open_mapping_request
656 IN unsigned int access; /* wanted access rights */
657 IN int inherit; /* inherit flag */
658 OUT int handle; /* handle to the mapping */
659 IN char name[1]; /* object name */
663 /* Get information about a file mapping */
664 struct get_mapping_info_request
666 IN int handle; /* handle to the mapping */
667 OUT int size_high; /* mapping size */
668 OUT int size_low; /* mapping size */
669 OUT int protect; /* protection flags */
673 /* Create a device */
674 struct create_device_request
676 IN unsigned int access; /* wanted access rights */
677 IN int inherit; /* inherit flag */
678 IN int id; /* client private id */
679 OUT int handle; /* handle to the device */
683 /* Create a snapshot */
684 struct create_snapshot_request
686 IN int inherit; /* inherit flag */
687 IN int flags; /* snapshot flags (TH32CS_*) */
688 OUT int handle; /* handle to the snapshot */
692 /* Get the next process from a snapshot */
693 struct next_process_request
695 IN int handle; /* handle to the snapshot */
696 IN int reset; /* reset snapshot position? */
697 OUT void* pid; /* process id */
698 OUT int threads; /* number of threads */
699 OUT int priority; /* process priority */
703 /* Wait for a debug event */
704 struct wait_debug_event_request
706 IN int timeout; /* timeout in ms */
707 OUT int code; /* event code */
708 OUT void* pid; /* process id */
709 OUT void* tid; /* thread id */
710 /* OUT union debug_event_data data; */
714 /* Send a debug event */
715 struct send_debug_event_request
717 IN int code; /* event code */
718 OUT int status; /* event continuation status */
719 /* IN union debug_event_data data; */
723 /* definitions of the event data depending on the event code */
724 struct debug_event_exception
726 int code; /* exception code */
727 int flags; /* exception flags */
728 void *record; /* exception record ptr */
729 void *addr; /* exception address */
730 int nb_params; /* exceptions parameters */
731 int params[15];
732 int first_chance; /* first chance to handle it? */
734 struct debug_event_create_thread
736 int handle; /* handle to the new thread */
737 void *teb; /* thread teb (in debugged process address space) */
738 void *start; /* thread startup routine */
740 struct debug_event_create_process
742 int file; /* handle to the process exe file */
743 int process; /* handle to the new process */
744 int thread; /* handle to the new thread */
745 void *base; /* base of executable image */
746 int dbg_offset; /* offset of debug info in file */
747 int dbg_size; /* size of debug info */
748 void *teb; /* thread teb (in debugged process address space) */
749 void *start; /* thread startup routine */
750 void *name; /* image name (optional) */
751 int unicode; /* is it Unicode? */
753 struct debug_event_exit
755 int exit_code; /* thread or process exit code */
757 struct debug_event_load_dll
759 int handle; /* file handle for the dll */
760 void *base; /* base address of the dll */
761 int dbg_offset; /* offset of debug info in file */
762 int dbg_size; /* size of debug info */
763 void *name; /* image name (optional) */
764 int unicode; /* is it Unicode? */
766 struct debug_event_unload_dll
768 void *base; /* base address of the dll */
770 struct debug_event_output_string
772 void *string; /* string to display (in debugged process address space) */
773 int unicode; /* is it Unicode? */
774 int length; /* string length */
776 struct debug_event_rip_info
778 int error; /* ??? */
779 int type; /* ??? */
781 union debug_event_data
783 struct debug_event_exception exception;
784 struct debug_event_create_thread create_thread;
785 struct debug_event_create_process create_process;
786 struct debug_event_exit exit;
787 struct debug_event_load_dll load_dll;
788 struct debug_event_unload_dll unload_dll;
789 struct debug_event_output_string output_string;
790 struct debug_event_rip_info rip_info;
794 /* Continue a debug event */
795 struct continue_debug_event_request
797 IN void* pid; /* process id to continue */
798 IN void* tid; /* thread id to continue */
799 IN int status; /* continuation status */
803 /* Start debugging an existing process */
804 struct debug_process_request
806 IN void* pid; /* id of the process to debug */
810 /* Read data from a process address space */
811 struct read_process_memory_request
813 IN int handle; /* process handle */
814 IN void* addr; /* addr to read from (must be int-aligned) */
815 IN int len; /* number of ints to read */
816 OUT unsigned int data[1]; /* result data */
820 /* Write data to a process address space */
821 struct write_process_memory_request
823 IN int handle; /* process handle */
824 IN void* addr; /* addr to write to (must be int-aligned) */
825 IN int len; /* number of ints to write */
826 IN unsigned int first_mask; /* mask for first word */
827 IN unsigned int last_mask; /* mask for last word */
828 IN unsigned int data[1]; /* data to write */
832 /* Everything below this line is generated automatically by tools/make_requests */
833 /* ### make_requests begin ### */
835 enum request
837 REQ_NEW_PROCESS,
838 REQ_NEW_THREAD,
839 REQ_SET_DEBUG,
840 REQ_INIT_PROCESS,
841 REQ_INIT_PROCESS_DONE,
842 REQ_INIT_THREAD,
843 REQ_GET_THREAD_BUFFER,
844 REQ_TERMINATE_PROCESS,
845 REQ_TERMINATE_THREAD,
846 REQ_GET_PROCESS_INFO,
847 REQ_SET_PROCESS_INFO,
848 REQ_GET_THREAD_INFO,
849 REQ_SET_THREAD_INFO,
850 REQ_SUSPEND_THREAD,
851 REQ_RESUME_THREAD,
852 REQ_DEBUGGER,
853 REQ_QUEUE_APC,
854 REQ_GET_APCS,
855 REQ_CLOSE_HANDLE,
856 REQ_GET_HANDLE_INFO,
857 REQ_SET_HANDLE_INFO,
858 REQ_DUP_HANDLE,
859 REQ_OPEN_PROCESS,
860 REQ_SELECT,
861 REQ_CREATE_EVENT,
862 REQ_EVENT_OP,
863 REQ_OPEN_EVENT,
864 REQ_CREATE_MUTEX,
865 REQ_RELEASE_MUTEX,
866 REQ_OPEN_MUTEX,
867 REQ_CREATE_SEMAPHORE,
868 REQ_RELEASE_SEMAPHORE,
869 REQ_OPEN_SEMAPHORE,
870 REQ_CREATE_FILE,
871 REQ_ALLOC_FILE_HANDLE,
872 REQ_GET_READ_FD,
873 REQ_GET_WRITE_FD,
874 REQ_SET_FILE_POINTER,
875 REQ_TRUNCATE_FILE,
876 REQ_SET_FILE_TIME,
877 REQ_FLUSH_FILE,
878 REQ_GET_FILE_INFO,
879 REQ_LOCK_FILE,
880 REQ_UNLOCK_FILE,
881 REQ_CREATE_PIPE,
882 REQ_CREATE_SOCKET,
883 REQ_ACCEPT_SOCKET,
884 REQ_SET_SOCKET_EVENT,
885 REQ_GET_SOCKET_EVENT,
886 REQ_ENABLE_SOCKET_EVENT,
887 REQ_ALLOC_CONSOLE,
888 REQ_FREE_CONSOLE,
889 REQ_OPEN_CONSOLE,
890 REQ_SET_CONSOLE_FD,
891 REQ_GET_CONSOLE_MODE,
892 REQ_SET_CONSOLE_MODE,
893 REQ_SET_CONSOLE_INFO,
894 REQ_GET_CONSOLE_INFO,
895 REQ_WRITE_CONSOLE_INPUT,
896 REQ_READ_CONSOLE_INPUT,
897 REQ_CREATE_CHANGE_NOTIFICATION,
898 REQ_CREATE_MAPPING,
899 REQ_OPEN_MAPPING,
900 REQ_GET_MAPPING_INFO,
901 REQ_CREATE_DEVICE,
902 REQ_CREATE_SNAPSHOT,
903 REQ_NEXT_PROCESS,
904 REQ_WAIT_DEBUG_EVENT,
905 REQ_SEND_DEBUG_EVENT,
906 REQ_CONTINUE_DEBUG_EVENT,
907 REQ_DEBUG_PROCESS,
908 REQ_READ_PROCESS_MEMORY,
909 REQ_WRITE_PROCESS_MEMORY,
910 REQ_NB_REQUESTS
913 /* ### make_requests end ### */
914 /* Everything above this line is generated automatically by tools/make_requests */
917 /* client-side functions */
919 #ifndef __WINE_SERVER__
921 #include "thread.h"
923 /* client communication functions */
925 extern unsigned int server_call_noerr( enum request req );
926 extern unsigned int server_call_fd( enum request req, int fd_out, int *fd_in );
927 extern void server_protocol_error( const char *err, ... );
929 /* get a pointer to the request buffer */
930 static inline void * WINE_UNUSED get_req_buffer(void)
932 return NtCurrentTeb()->buffer;
935 /* maximum remaining size in the server buffer */
936 static inline int WINE_UNUSED server_remaining( const void *ptr )
938 return (char *)NtCurrentTeb()->buffer + NtCurrentTeb()->buffer_size - (char *)ptr;
941 /* do a server call and set the last error code */
942 static inline int server_call( enum request req )
944 unsigned int res = server_call_noerr( req );
945 if (res) SetLastError( res );
946 return res;
949 extern int CLIENT_InitServer(void);
950 extern int CLIENT_SetDebug( int level );
951 extern int CLIENT_DebuggerRequest( int op );
952 extern int CLIENT_InitThread(void);
953 #endif /* __WINE_SERVER__ */
955 #endif /* __WINE_SERVER_H */