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*/
27 /* a path name for server requests (Unicode) */
28 typedef WCHAR path_t[MAX_PATH+1];
30 /* Create a new process from the context of the parent */
31 struct new_process_request
33 IN int inherit; /* inherit flag */
34 IN int inherit_all; /* inherit all handles from parent */
35 IN int create_flags; /* creation flags */
36 IN int start_flags; /* flags from startup info */
37 IN int hstdin; /* handle for stdin */
38 IN int hstdout; /* handle for stdout */
39 IN int hstderr; /* handle for stderr */
40 IN int event; /* event to signal startup */
41 IN int cmd_show; /* main window show mode */
42 IN void* env_ptr; /* pointer to environment (FIXME: hack) */
43 OUT void* pid; /* process id */
44 OUT int handle; /* process handle (in the current process) */
45 IN char cmdline[1]; /* command line */
49 /* Create a new thread from the context of the parent */
50 struct new_thread_request
52 IN void* pid; /* process id for the new thread */
53 IN int suspend; /* new thread should be suspended on creation */
54 IN int inherit; /* inherit flag */
55 OUT void* tid; /* thread id */
56 OUT int handle; /* thread handle (in the current process) */
60 /* Set the server debug level */
61 struct set_debug_request
63 IN int level; /* New debug level */
67 /* Initialize a process; called from the new process context */
68 struct init_process_request
70 OUT int start_flags; /* flags from startup info */
71 OUT int hstdin; /* handle for stdin */
72 OUT int hstdout; /* handle for stdout */
73 OUT int hstderr; /* handle for stderr */
74 OUT int cmd_show; /* main window show mode */
75 OUT void* env_ptr; /* pointer to environment (FIXME: hack) */
76 OUT char cmdline[1]; /* command line */
80 /* Signal the end of the process initialization */
81 struct init_process_done_request
87 /* Initialize a thread; called from the child after fork()/clone() */
88 struct init_thread_request
90 IN int unix_pid; /* Unix pid of new thread */
91 IN void* teb; /* TEB of new thread (in thread address space) */
92 OUT void* pid; /* process id of the new thread's process */
93 OUT void* tid; /* thread id of the new thread */
97 /* Retrieve the thread buffer file descriptor */
98 /* The reply to this request is the first thing a newly */
99 /* created thread gets (without having to request it) */
100 struct get_thread_buffer_request
106 /* Terminate a process */
107 struct terminate_process_request
109 IN int handle; /* process handle to terminate */
110 IN int exit_code; /* process exit code */
114 /* Terminate a thread */
115 struct terminate_thread_request
117 IN int handle; /* thread handle to terminate */
118 IN int exit_code; /* thread exit code */
122 /* Retrieve information about a process */
123 struct get_process_info_request
125 IN int handle; /* process handle */
126 OUT void* pid; /* server process id */
127 OUT int exit_code; /* process exit code */
128 OUT int priority; /* priority class */
129 OUT int process_affinity; /* process affinity mask */
130 OUT int system_affinity; /* system affinity mask */
134 /* Set a process informations */
135 struct set_process_info_request
137 IN int handle; /* process handle */
138 IN int mask; /* setting mask (see below) */
139 IN int priority; /* priority class */
140 IN int affinity; /* affinity mask */
142 #define SET_PROCESS_INFO_PRIORITY 0x01
143 #define SET_PROCESS_INFO_AFFINITY 0x02
146 /* Retrieve information about a thread */
147 struct get_thread_info_request
149 IN int handle; /* thread handle */
150 OUT void* tid; /* server thread id */
151 OUT int exit_code; /* thread exit code */
152 OUT int priority; /* thread priority level */
156 /* Set a thread informations */
157 struct set_thread_info_request
159 IN int handle; /* thread handle */
160 IN int mask; /* setting mask (see below) */
161 IN int priority; /* priority class */
162 IN int affinity; /* affinity mask */
164 #define SET_THREAD_INFO_PRIORITY 0x01
165 #define SET_THREAD_INFO_AFFINITY 0x02
168 /* Suspend a thread */
169 struct suspend_thread_request
171 IN int handle; /* thread handle */
172 OUT int count; /* new suspend count */
176 /* Resume a thread */
177 struct resume_thread_request
179 IN int handle; /* thread handle */
180 OUT int count; /* new suspend count */
184 /* Debugger support: freeze / unfreeze */
185 struct debugger_request
187 IN int op; /* operation type */
190 enum debugger_op { DEBUGGER_FREEZE_ALL, DEBUGGER_UNFREEZE_ALL };
193 /* Queue an APC for a thread */
194 struct queue_apc_request
196 IN int handle; /* thread handle */
197 IN void* func; /* function to call */
198 IN void* param; /* param for function to call */
202 /* Get list of APC to call */
203 struct get_apcs_request
205 OUT int count; /* number of apcs */
206 OUT void* apcs[1]; /* async procedures to call */
210 /* Close a handle for the current process */
211 struct close_handle_request
213 IN int handle; /* handle to close */
217 /* Get information about a handle */
218 struct get_handle_info_request
220 IN int handle; /* handle we are interested in */
221 OUT int flags; /* handle flags */
225 /* Set a handle information */
226 struct set_handle_info_request
228 IN int handle; /* handle we are interested in */
229 IN int flags; /* new handle flags */
230 IN int mask; /* mask for flags to set */
234 /* Duplicate a handle */
235 struct dup_handle_request
237 IN int src_process; /* src process handle */
238 IN int src_handle; /* src handle to duplicate */
239 IN int dst_process; /* dst process handle */
240 IN unsigned int access; /* wanted access rights */
241 IN int inherit; /* inherit flag */
242 IN int options; /* duplicate options (see below) */
243 OUT int handle; /* duplicated handle in dst process */
245 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
246 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
247 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
250 /* Open a handle to a process */
251 struct open_process_request
253 IN void* pid; /* process id to open */
254 IN unsigned int access; /* wanted access rights */
255 IN int inherit; /* inherit flag */
256 OUT int handle; /* handle to the process */
260 /* Wait for handles */
261 struct select_request
263 IN int count; /* handles count */
264 IN int flags; /* wait flags (see below) */
265 IN int timeout; /* timeout in ms */
266 OUT int signaled; /* signaled handle */
267 IN int handles[1]; /* handles to select on */
270 #define SELECT_ALERTABLE 2
271 #define SELECT_TIMEOUT 4
274 /* Create an event */
275 struct create_event_request
277 IN int manual_reset; /* manual reset event */
278 IN int initial_state; /* initial state of the event */
279 IN int inherit; /* inherit flag */
280 OUT int handle; /* handle to the event */
281 IN char name[1]; /* event name */
284 /* Event operation */
285 struct event_op_request
287 IN int handle; /* handle to event */
288 IN int op; /* event operation (see below) */
290 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
294 struct open_event_request
296 IN unsigned int access; /* wanted access rights */
297 IN int inherit; /* inherit flag */
298 OUT int handle; /* handle to the event */
299 IN char name[1]; /* object name */
304 struct create_mutex_request
306 IN int owned; /* initially owned? */
307 IN int inherit; /* inherit flag */
308 OUT int handle; /* handle to the mutex */
309 IN char name[1]; /* mutex name */
313 /* Release a mutex */
314 struct release_mutex_request
316 IN int handle; /* handle to the mutex */
321 struct open_mutex_request
323 IN unsigned int access; /* wanted access rights */
324 IN int inherit; /* inherit flag */
325 OUT int handle; /* handle to the mutex */
326 IN char name[1]; /* object name */
330 /* Create a semaphore */
331 struct create_semaphore_request
333 IN unsigned int initial; /* initial count */
334 IN unsigned int max; /* maximum count */
335 IN int inherit; /* inherit flag */
336 OUT int handle; /* handle to the semaphore */
337 IN char name[1]; /* semaphore name */
341 /* Release a semaphore */
342 struct release_semaphore_request
344 IN int handle; /* handle to the semaphore */
345 IN unsigned int count; /* count to add to semaphore */
346 OUT unsigned int prev_count; /* previous semaphore count */
350 /* Open a semaphore */
351 struct open_semaphore_request
353 IN unsigned int access; /* wanted access rights */
354 IN int inherit; /* inherit flag */
355 OUT int handle; /* handle to the semaphore */
356 IN char name[1]; /* object name */
361 struct create_file_request
363 IN unsigned int access; /* wanted access rights */
364 IN int inherit; /* inherit flag */
365 IN unsigned int sharing; /* sharing flags */
366 IN int create; /* file create action */
367 IN unsigned int attrs; /* file attributes for creation */
368 OUT int handle; /* handle to the file */
369 IN char name[1]; /* file name */
373 /* Allocate a file handle for a Unix fd */
374 struct alloc_file_handle_request
376 IN unsigned int access; /* wanted access rights */
377 OUT int handle; /* handle to the file */
381 /* Get a Unix fd to read from a file */
382 struct get_read_fd_request
384 IN int handle; /* handle to the file */
388 /* Get a Unix fd to write to a file */
389 struct get_write_fd_request
391 IN int handle; /* handle to the file */
395 /* Set a file current position */
396 struct set_file_pointer_request
398 IN int handle; /* handle to the file */
399 IN int low; /* position low word */
400 IN int high; /* position high word */
401 IN int whence; /* whence to seek */
402 OUT int new_low; /* new position low word */
403 OUT int new_high; /* new position high word */
407 /* Truncate (or extend) a file */
408 struct truncate_file_request
410 IN int handle; /* handle to the file */
414 /* Set a file access and modification times */
415 struct set_file_time_request
417 IN int handle; /* handle to the file */
418 IN time_t access_time; /* last access time */
419 IN time_t write_time; /* last write time */
423 /* Flush a file buffers */
424 struct flush_file_request
426 IN int handle; /* handle to the file */
430 /* Get information about a file */
431 struct get_file_info_request
433 IN int handle; /* handle to the file */
434 OUT int type; /* file type */
435 OUT int attr; /* file attributes */
436 OUT time_t access_time; /* last access time */
437 OUT time_t write_time; /* last write time */
438 OUT int size_high; /* file size */
439 OUT int size_low; /* file size */
440 OUT int links; /* number of links */
441 OUT int index_high; /* unique index */
442 OUT int index_low; /* unique index */
443 OUT unsigned int serial; /* volume serial number */
447 /* Lock a region of a file */
448 struct lock_file_request
450 IN int handle; /* handle to the file */
451 IN unsigned int offset_low; /* offset of start of lock */
452 IN unsigned int offset_high; /* offset of start of lock */
453 IN unsigned int count_low; /* count of bytes to lock */
454 IN unsigned int count_high; /* count of bytes to lock */
458 /* Unlock a region of a file */
459 struct unlock_file_request
461 IN int handle; /* handle to the file */
462 IN unsigned int offset_low; /* offset of start of unlock */
463 IN unsigned int offset_high; /* offset of start of unlock */
464 IN unsigned int count_low; /* count of bytes to unlock */
465 IN unsigned int count_high; /* count of bytes to unlock */
469 /* Create an anonymous pipe */
470 struct create_pipe_request
472 IN int inherit; /* inherit flag */
473 OUT int handle_read; /* handle to the read-side of the pipe */
474 OUT int handle_write; /* handle to the write-side of the pipe */
478 /* Create a socket */
479 struct create_socket_request
481 IN unsigned int access; /* wanted access rights */
482 IN int inherit; /* inherit flag */
483 IN int family; /* family, see socket manpage */
484 IN int type; /* type, see socket manpage */
485 IN int protocol; /* protocol, see socket manpage */
486 OUT int handle; /* handle to the new socket */
490 /* Accept a socket */
491 struct accept_socket_request
493 IN int lhandle; /* handle to the listening socket */
494 IN unsigned int access; /* wanted access rights */
495 IN int inherit; /* inherit flag */
496 OUT int handle; /* handle to the new socket */
500 /* Set socket event parameters */
501 struct set_socket_event_request
503 IN int handle; /* handle to the socket */
504 IN unsigned int mask; /* event mask */
505 IN int event; /* event object */
509 /* Get socket event parameters */
510 struct get_socket_event_request
512 IN int handle; /* handle to the socket */
513 IN int service; /* clear pending? */
514 IN int s_event; /* "expected" event object */
515 OUT unsigned int mask; /* event mask */
516 OUT unsigned int pmask; /* pending events */
517 OUT unsigned int state; /* status bits */
518 OUT int errors[1]; /* event errors */
522 /* Reenable pending socket events */
523 struct enable_socket_event_request
525 IN int handle; /* handle to the socket */
526 IN unsigned int mask; /* events to re-enable */
527 IN unsigned int sstate; /* status bits to set */
528 IN unsigned int cstate; /* status bits to clear */
532 /* Allocate a console for the current process */
533 struct alloc_console_request
535 IN unsigned int access; /* wanted access rights */
536 IN int inherit; /* inherit flag */
537 OUT int handle_in; /* handle to console input */
538 OUT int handle_out; /* handle to console output */
542 /* Free the console of the current process */
543 struct free_console_request
549 /* Open a handle to the process console */
550 struct open_console_request
552 IN int output; /* input or output? */
553 IN unsigned int access; /* wanted access rights */
554 IN int inherit; /* inherit flag */
555 OUT int handle; /* handle to the console */
559 /* Set a console file descriptor */
560 struct set_console_fd_request
562 IN int handle; /* handle to the console */
563 IN int file_handle; /* handle of file to use as file descriptor */
564 IN int pid; /* pid of xterm (hack) */
568 /* Get a console mode (input or output) */
569 struct get_console_mode_request
571 IN int handle; /* handle to the console */
572 OUT int mode; /* console mode */
576 /* Set a console mode (input or output) */
577 struct set_console_mode_request
579 IN int handle; /* handle to the console */
580 IN int mode; /* console mode */
584 /* Set info about a console (output only) */
585 struct set_console_info_request
587 IN int handle; /* handle to the console */
588 IN int mask; /* setting mask (see below) */
589 IN int cursor_size; /* size of cursor (percentage filled) */
590 IN int cursor_visible;/* cursor visibility flag */
591 IN char title[1]; /* console title */
593 #define SET_CONSOLE_INFO_CURSOR 0x01
594 #define SET_CONSOLE_INFO_TITLE 0x02
596 /* Get info about a console (output only) */
597 struct get_console_info_request
599 IN int handle; /* handle to the console */
600 OUT int cursor_size; /* size of cursor (percentage filled) */
601 OUT int cursor_visible;/* cursor visibility flag */
602 OUT int pid; /* pid of xterm (hack) */
603 OUT char title[1]; /* console title */
607 /* Add input records to a console input queue */
608 struct write_console_input_request
610 IN int handle; /* handle to the console input */
611 IN int count; /* number of input records */
612 OUT int written; /* number of records written */
613 /* INPUT_RECORD records[0]; */ /* input records */
616 /* Fetch input records from a console input queue */
617 struct read_console_input_request
619 IN int handle; /* handle to the console input */
620 IN int count; /* max number of records to retrieve */
621 IN int flush; /* flush the retrieved records from the queue? */
622 OUT int read; /* number of records read */
623 /* INPUT_RECORD records[0]; */ /* input records */
627 /* Create a change notification */
628 struct create_change_notification_request
630 IN int subtree; /* watch all the subtree */
631 IN int filter; /* notification filter */
632 OUT int handle; /* handle to the change notification */
636 /* Create a file mapping */
637 struct create_mapping_request
639 IN int size_high; /* mapping size */
640 IN int size_low; /* mapping size */
641 IN int protect; /* protection flags (see below) */
642 IN int inherit; /* inherit flag */
643 IN int file_handle; /* file handle */
644 OUT int handle; /* handle to the mapping */
645 IN char name[1]; /* object name */
647 /* protection flags */
648 #define VPROT_READ 0x01
649 #define VPROT_WRITE 0x02
650 #define VPROT_EXEC 0x04
651 #define VPROT_WRITECOPY 0x08
652 #define VPROT_GUARD 0x10
653 #define VPROT_NOCACHE 0x20
654 #define VPROT_COMMITTED 0x40
658 struct open_mapping_request
660 IN unsigned int access; /* wanted access rights */
661 IN int inherit; /* inherit flag */
662 OUT int handle; /* handle to the mapping */
663 IN char name[1]; /* object name */
667 /* Get information about a file mapping */
668 struct get_mapping_info_request
670 IN int handle; /* handle to the mapping */
671 OUT int size_high; /* mapping size */
672 OUT int size_low; /* mapping size */
673 OUT int protect; /* protection flags */
677 /* Create a device */
678 struct create_device_request
680 IN unsigned int access; /* wanted access rights */
681 IN int inherit; /* inherit flag */
682 IN int id; /* client private id */
683 OUT int handle; /* handle to the device */
687 /* Create a snapshot */
688 struct create_snapshot_request
690 IN int inherit; /* inherit flag */
691 IN int flags; /* snapshot flags (TH32CS_*) */
692 OUT int handle; /* handle to the snapshot */
696 /* Get the next process from a snapshot */
697 struct next_process_request
699 IN int handle; /* handle to the snapshot */
700 IN int reset; /* reset snapshot position? */
701 OUT void* pid; /* process id */
702 OUT int threads; /* number of threads */
703 OUT int priority; /* process priority */
707 /* Wait for a debug event */
708 struct wait_debug_event_request
710 IN int timeout; /* timeout in ms */
711 OUT int code; /* event code */
712 OUT void* pid; /* process id */
713 OUT void* tid; /* thread id */
714 /* OUT union debug_event_data data; */
718 /* Send a debug event */
719 struct send_debug_event_request
721 IN int code; /* event code */
722 OUT int status; /* event continuation status */
723 /* IN union debug_event_data data; */
727 /* definitions of the event data depending on the event code */
728 struct debug_event_exception
730 int code; /* exception code */
731 int flags; /* exception flags */
732 void *record; /* exception record ptr */
733 void *addr; /* exception address */
734 int nb_params; /* exceptions parameters */
736 int first_chance; /* first chance to handle it? */
738 struct debug_event_create_thread
740 int handle; /* handle to the new thread */
741 void *teb; /* thread teb (in debugged process address space) */
742 void *start; /* thread startup routine */
744 struct debug_event_create_process
746 int file; /* handle to the process exe file */
747 int process; /* handle to the new process */
748 int thread; /* handle to the new thread */
749 void *base; /* base of executable image */
750 int dbg_offset; /* offset of debug info in file */
751 int dbg_size; /* size of debug info */
752 void *teb; /* thread teb (in debugged process address space) */
753 void *start; /* thread startup routine */
754 void *name; /* image name (optional) */
755 int unicode; /* is it Unicode? */
757 struct debug_event_exit
759 int exit_code; /* thread or process exit code */
761 struct debug_event_load_dll
763 int handle; /* file handle for the dll */
764 void *base; /* base address of the dll */
765 int dbg_offset; /* offset of debug info in file */
766 int dbg_size; /* size of debug info */
767 void *name; /* image name (optional) */
768 int unicode; /* is it Unicode? */
770 struct debug_event_unload_dll
772 void *base; /* base address of the dll */
774 struct debug_event_output_string
776 void *string; /* string to display (in debugged process address space) */
777 int unicode; /* is it Unicode? */
778 int length; /* string length */
780 struct debug_event_rip_info
785 union debug_event_data
787 struct debug_event_exception exception;
788 struct debug_event_create_thread create_thread;
789 struct debug_event_create_process create_process;
790 struct debug_event_exit exit;
791 struct debug_event_load_dll load_dll;
792 struct debug_event_unload_dll unload_dll;
793 struct debug_event_output_string output_string;
794 struct debug_event_rip_info rip_info;
798 /* Continue a debug event */
799 struct continue_debug_event_request
801 IN void* pid; /* process id to continue */
802 IN void* tid; /* thread id to continue */
803 IN int status; /* continuation status */
807 /* Start debugging an existing process */
808 struct debug_process_request
810 IN void* pid; /* id of the process to debug */
814 /* Read data from a process address space */
815 struct read_process_memory_request
817 IN int handle; /* process handle */
818 IN void* addr; /* addr to read from (must be int-aligned) */
819 IN int len; /* number of ints to read */
820 OUT unsigned int data[1]; /* result data */
824 /* Write data to a process address space */
825 struct write_process_memory_request
827 IN int handle; /* process handle */
828 IN void* addr; /* addr to write to (must be int-aligned) */
829 IN int len; /* number of ints to write */
830 IN unsigned int first_mask; /* mask for first word */
831 IN unsigned int last_mask; /* mask for last word */
832 IN unsigned int data[1]; /* data to write */
836 /* Create a registry key */
837 struct create_key_request
839 IN int parent; /* handle to the parent key */
840 IN unsigned int access; /* desired access rights */
841 IN unsigned int options; /* creation options */
842 IN time_t modif; /* last modification time */
843 OUT int hkey; /* handle to the created key */
844 OUT int created; /* has it been newly created? */
845 IN path_t name; /* key name */
846 IN WCHAR class[1]; /* class name */
850 /* Open a registry key */
851 struct open_key_request
853 IN int parent; /* handle to the parent key */
854 IN unsigned int access; /* desired access rights */
855 OUT int hkey; /* handle to the open key */
856 IN path_t name; /* key name */
860 /* Delete a registry key */
861 struct delete_key_request
863 IN int hkey; /* handle to the parent key */
864 IN path_t name; /* key name */
868 /* Close a registry key */
869 struct close_key_request
871 IN int hkey; /* key to close */
875 /* Enumerate registry subkeys */
876 struct enum_key_request
878 IN int hkey; /* handle to registry key */
879 IN int index; /* index of subkey */
880 OUT time_t modif; /* last modification time */
881 OUT path_t name; /* subkey name */
882 OUT WCHAR class[1]; /* class name */
886 /* Query information about a registry key */
887 struct query_key_info_request
889 IN int hkey; /* handle to registry key */
890 OUT int subkeys; /* number of subkeys */
891 OUT int max_subkey; /* longest subkey name */
892 OUT int max_class; /* longest class name */
893 OUT int values; /* number of values */
894 OUT int max_value; /* longest value name */
895 OUT int max_data; /* longest value data */
896 OUT time_t modif; /* last modification time */
897 OUT WCHAR class[1]; /* class name */
901 /* Set a value of a registry key */
902 struct set_key_value_request
904 IN int hkey; /* handle to registry key */
905 IN int type; /* value type */
906 IN int len; /* value data len */
907 IN path_t name; /* value name */
908 IN unsigned char data[1]; /* value data */
912 /* Retrieve the value of a registry key */
913 struct get_key_value_request
915 IN int hkey; /* handle to registry key */
916 OUT int type; /* value type */
917 OUT int len; /* value data len */
918 IN WCHAR name[1]; /* value name */
919 OUT unsigned char data[1]; /* value data */
923 /* Enumerate a value of a registry key */
924 struct enum_key_value_request
926 IN int hkey; /* handle to registry key */
927 IN int index; /* value index */
928 OUT int type; /* value type */
929 OUT int len; /* value data len */
930 OUT path_t name; /* value name */
931 OUT unsigned char data[1]; /* value data */
935 /* Delete a value of a registry key */
936 struct delete_key_value_request
938 IN int hkey; /* handle to registry key */
939 IN path_t name; /* value name */
943 /* Load a registry branch from a file */
944 struct load_registry_request
946 IN int hkey; /* root key to load to */
947 IN int file; /* file to load from */
948 IN path_t name; /* subkey name */
952 /* Save a registry branch to a file */
953 struct save_registry_request
955 IN int hkey; /* key to save */
956 IN int file; /* file to save to */
960 /* Set the current and saving level for the registry */
961 struct set_registry_levels_request
963 IN int current; /* new current level */
964 IN int saving; /* new saving level */
968 /* Everything below this line is generated automatically by tools/make_requests */
969 /* ### make_requests begin ### */
977 REQ_INIT_PROCESS_DONE,
979 REQ_GET_THREAD_BUFFER,
980 REQ_TERMINATE_PROCESS,
981 REQ_TERMINATE_THREAD,
982 REQ_GET_PROCESS_INFO,
983 REQ_SET_PROCESS_INFO,
1003 REQ_CREATE_SEMAPHORE,
1004 REQ_RELEASE_SEMAPHORE,
1007 REQ_ALLOC_FILE_HANDLE,
1010 REQ_SET_FILE_POINTER,
1020 REQ_SET_SOCKET_EVENT,
1021 REQ_GET_SOCKET_EVENT,
1022 REQ_ENABLE_SOCKET_EVENT,
1027 REQ_GET_CONSOLE_MODE,
1028 REQ_SET_CONSOLE_MODE,
1029 REQ_SET_CONSOLE_INFO,
1030 REQ_GET_CONSOLE_INFO,
1031 REQ_WRITE_CONSOLE_INPUT,
1032 REQ_READ_CONSOLE_INPUT,
1033 REQ_CREATE_CHANGE_NOTIFICATION,
1036 REQ_GET_MAPPING_INFO,
1038 REQ_CREATE_SNAPSHOT,
1040 REQ_WAIT_DEBUG_EVENT,
1041 REQ_SEND_DEBUG_EVENT,
1042 REQ_CONTINUE_DEBUG_EVENT,
1044 REQ_READ_PROCESS_MEMORY,
1045 REQ_WRITE_PROCESS_MEMORY,
1055 REQ_DELETE_KEY_VALUE,
1058 REQ_SET_REGISTRY_LEVELS,
1062 /* ### make_requests end ### */
1063 /* Everything above this line is generated automatically by tools/make_requests */
1066 /* client-side functions */
1068 #ifndef __WINE_SERVER__
1072 /* client communication functions */
1074 extern unsigned int server_call_noerr( enum request req );
1075 extern unsigned int server_call_fd( enum request req, int fd_out, int *fd_in );
1076 extern void server_protocol_error( const char *err, ... );
1078 /* get a pointer to the request buffer */
1079 static inline void * WINE_UNUSED get_req_buffer(void)
1081 return NtCurrentTeb()->buffer;
1084 /* maximum remaining size in the server buffer */
1085 static inline int WINE_UNUSED server_remaining( const void *ptr )
1087 return (char *)NtCurrentTeb()->buffer + NtCurrentTeb()->buffer_size - (char *)ptr;
1090 /* do a server call and set the last error code */
1091 static inline int server_call( enum request req )
1093 unsigned int res = server_call_noerr( req );
1094 if (res) SetLastError( res );
1098 extern int CLIENT_InitServer(void);
1099 extern int CLIENT_SetDebug( int level );
1100 extern int CLIENT_DebuggerRequest( int op );
1101 extern int CLIENT_InitThread(void);
1102 #endif /* __WINE_SERVER__ */
1104 #endif /* __WINE_SERVER_H */