Moved server.h to include/wine.

This commit is contained in:
Alexandre Julliard 2001-07-19 00:39:09 +00:00
parent 37ec927536
commit 37e9503ae8
45 changed files with 1926 additions and 1919 deletions

View File

@ -21,7 +21,7 @@
#include "winerror.h" #include "winerror.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "heap.h" #include "heap.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(reg); DEFAULT_DEBUG_CHANNEL(reg);

View File

@ -65,7 +65,7 @@
#include "heap.h" #include "heap.h"
#include "options.h" #include "options.h"
#include "wine/port.h" #include "wine/port.h"
#include "server.h" #include "wine/server.h"
#include "winerror.h" #include "winerror.h"
#include "services.h" #include "services.h"
#include "callback.h" #include "callback.h"

View File

@ -9,7 +9,7 @@
#include "winerror.h" #include "winerror.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "server.h" #include "wine/server.h"
#include "stackframe.h" #include "stackframe.h"
#include "debugtools.h" #include "debugtools.h"

View File

@ -8,7 +8,7 @@
#include "winerror.h" #include "winerror.h"
#include "winnls.h" #include "winnls.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(win32); DEFAULT_DEBUG_CHANNEL(win32);

View File

@ -16,7 +16,7 @@
#include "tlhelp32.h" #include "tlhelp32.h"
#include "toolhelp.h" #include "toolhelp.h"
#include "heap.h" #include "heap.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(toolhelp); DEFAULT_DEBUG_CHANNEL(toolhelp);

View File

@ -15,7 +15,7 @@
#include "wine/exception.h" #include "wine/exception.h"
#include "stackframe.h" #include "stackframe.h"
#include "miscemu.h" #include "miscemu.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(seh); DEFAULT_DEBUG_CHANNEL(seh);

View File

@ -15,7 +15,7 @@
#include "ntddk.h" #include "ntddk.h"
#include "ntdll_misc.h" #include "ntdll_misc.h"
#include "server.h" #include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(ntdll); DEFAULT_DEBUG_CHANNEL(ntdll);

View File

@ -9,7 +9,7 @@
#include "ntddk.h" #include "ntddk.h"
#include "ntdll_misc.h" #include "ntdll_misc.h"
#include "server.h" #include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(ntdll); DEFAULT_DEBUG_CHANNEL(ntdll);

View File

@ -16,7 +16,7 @@
#include "winreg.h" #include "winreg.h"
#include "winerror.h" #include "winerror.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "server.h" #include "wine/server.h"
#include "ntddk.h" #include "ntddk.h"
#include "ntdll_misc.h" #include "ntdll_misc.h"

View File

@ -10,7 +10,7 @@
#include "winerror.h" #include "winerror.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "server.h" #include "wine/server.h"
#include "ntddk.h" #include "ntddk.h"
#include "ntdll_misc.h" #include "ntdll_misc.h"

View File

@ -96,7 +96,7 @@
#include "heap.h" #include "heap.h"
#include "wine/port.h" #include "wine/port.h"
#include "services.h" #include "services.h"
#include "server.h" #include "wine/server.h"
#include "file.h" #include "file.h"
#include "debugtools.h" #include "debugtools.h"

View File

@ -17,7 +17,7 @@
#include "winbase.h" #include "winbase.h"
#include "winerror.h" #include "winerror.h"
#include "heap.h" #include "heap.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(file); DEFAULT_DEBUG_CHANNEL(file);

View File

@ -34,7 +34,7 @@
#include "msdos.h" #include "msdos.h"
#include "ntddk.h" #include "ntddk.h"
#include "options.h" #include "options.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"

View File

@ -44,7 +44,7 @@
#include "wincon.h" #include "wincon.h"
#include "debugtools.h" #include "debugtools.h"
#include "server.h" #include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(file); DEFAULT_DEBUG_CHANNEL(file);

View File

@ -26,7 +26,7 @@
#include "heap.h" #include "heap.h"
#include "debugtools.h" #include "debugtools.h"
#include "options.h" #include "options.h"
#include "server.h" #include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(profile); DEFAULT_DEBUG_CHANNEL(profile);

View File

@ -31,7 +31,7 @@
#include "debugtools.h" #include "debugtools.h"
#include "user.h" /* for TWEAK_WineLook (FIXME) */ #include "user.h" /* for TWEAK_WineLook (FIXME) */
#include "x11font.h" #include "x11font.h"
#include "server.h" #include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(font); DEFAULT_DEBUG_CHANNEL(font);

File diff suppressed because it is too large Load Diff

99
include/wine/server.h Normal file
View File

@ -0,0 +1,99 @@
/*
* Definitions for the client side of the Wine server communication
*
* Copyright (C) 1998 Alexandre Julliard
*/
#ifndef __WINE_WINE_SERVER_H
#define __WINE_WINE_SERVER_H
#include "thread.h"
#include "ntddk.h"
#include "wine/exception.h"
#include "wine/server_protocol.h"
/* client communication functions */
extern unsigned int wine_server_call( union generic_request *req, size_t size );
extern void server_protocol_error( const char *err, ... ) WINE_NORETURN;
extern void server_protocol_perror( const char *err ) WINE_NORETURN;
extern void wine_server_alloc_req( union generic_request *req, size_t size );
extern void wine_server_send_fd( int fd );
extern int wine_server_recv_fd( handle_t handle );
extern const char *get_config_dir(void);
/* do a server call and set the last error code */
inline static unsigned int __server_call_err( union generic_request *req, size_t size )
{
unsigned int res = wine_server_call( req, size );
if (res) SetLastError( RtlNtStatusToDosError(res) );
return res;
}
/* get a pointer to the variable part of the request */
inline static void *server_data_ptr( const void *req )
{
return (char *)NtCurrentTeb()->buffer + ((struct request_header *)req)->var_offset;
}
/* get the size of the variable part of the request */
inline static size_t server_data_size( const void *req )
{
return ((struct request_header *)req)->var_size;
}
/* exception support for server calls */
extern DWORD __wine_server_exception_handler( PEXCEPTION_RECORD record, EXCEPTION_FRAME *frame,
CONTEXT *context, EXCEPTION_FRAME **pdispatcher );
struct __server_exception_frame
{
EXCEPTION_FRAME frame;
unsigned int buffer_pos; /* saved buffer position */
};
/* macros for server requests */
#define SERVER_START_REQ(type) \
do { \
union generic_request __req; \
struct type##_request * const req = &__req.type; \
__req.header.req = REQ_##type; \
__req.header.var_size = 0; \
do
#define SERVER_END_REQ \
while(0); \
} while(0)
#define SERVER_START_VAR_REQ(type,size) \
do { \
struct __server_exception_frame __f; \
union generic_request __req; \
struct type##_request * const req = &__req.type; \
__f.frame.Handler = __wine_server_exception_handler; \
__f.buffer_pos = NtCurrentTeb()->buffer_pos; \
__wine_push_frame( &__f.frame ); \
__req.header.req = REQ_##type; \
wine_server_alloc_req( &__req, (size) ); \
do
#define SERVER_END_VAR_REQ \
while(0); \
NtCurrentTeb()->buffer_pos = __f.buffer_pos; \
__wine_pop_frame( &__f.frame ); \
} while(0)
#define SERVER_CALL() (wine_server_call( &__req, sizeof(*req) ))
#define SERVER_CALL_ERR() (__server_call_err( &__req, sizeof(*req) ))
extern void CLIENT_InitServer(void);
extern void CLIENT_InitThread(void);
extern void CLIENT_BootDone( int debug_level );
extern int CLIENT_IsBootThread(void);
#endif /* __WINE_WINE_SERVER_H */

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
#include "file.h" #include "file.h"
#include "options.h" #include "options.h"
#include "debugtools.h" #include "debugtools.h"
#include "server.h" #include "wine/server.h"
#include "loadorder.h" #include "loadorder.h"
DEFAULT_DEBUG_CHANNEL(server); DEFAULT_DEBUG_CHANNEL(server);

View File

@ -19,7 +19,7 @@
#include "debugtools.h" #include "debugtools.h"
#include "callback.h" #include "callback.h"
#include "loadorder.h" #include "loadorder.h"
#include "server.h" #include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(module); DEFAULT_DEBUG_CHANNEL(module);
DECLARE_DEBUG_CHANNEL(win32); DECLARE_DEBUG_CHANNEL(win32);

View File

@ -33,7 +33,7 @@
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "winerror.h" #include "winerror.h"
#include "snoop.h" #include "snoop.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(win32); DEFAULT_DEBUG_CHANNEL(win32);

View File

@ -29,7 +29,7 @@
#include "ntddk.h" #include "ntddk.h"
#include "selectors.h" #include "selectors.h"
#include "services.h" #include "services.h"
#include "server.h" #include "wine/server.h"
#include "syslevel.h" #include "syslevel.h"
#include "stackframe.h" #include "stackframe.h"
#include "task.h" #include "task.h"

View File

@ -24,7 +24,7 @@
#include "instance.h" #include "instance.h"
#include "stackframe.h" #include "stackframe.h"
#include "debugtools.h" #include "debugtools.h"
#include "server.h" #include "wine/server.h"
DEFAULT_DEBUG_CHANNEL(atom); DEFAULT_DEBUG_CHANNEL(atom);

View File

@ -22,7 +22,7 @@
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "heap.h" #include "heap.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(reg); DEFAULT_DEBUG_CHANNEL(reg);

View File

@ -12,7 +12,7 @@
#include "miscemu.h" #include "miscemu.h"
#include "selectors.h" #include "selectors.h"
#include "stackframe.h" #include "stackframe.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
#include "toolhelp.h" #include "toolhelp.h"

View File

@ -29,7 +29,7 @@
#include "winerror.h" #include "winerror.h"
#include "file.h" #include "file.h"
#include "global.h" #include "global.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(virtual); DEFAULT_DEBUG_CHANNEL(virtual);

View File

@ -41,7 +41,7 @@
#include "file.h" #include "file.h"
#include "heap.h" #include "heap.h"
#include "options.h" #include "options.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"

View File

@ -22,7 +22,7 @@
#include "file.h" #include "file.h"
#include "heap.h" #include "heap.h"
#include "winerror.h" #include "winerror.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(module); DEFAULT_DEBUG_CHANNEL(module);

View File

@ -32,7 +32,7 @@
#include "wine/port.h" #include "wine/port.h"
#include "thread.h" #include "thread.h"
#include "server.h" #include "wine/server.h"
#include "winerror.h" #include "winerror.h"
#include "options.h" #include "options.h"

View File

@ -8,7 +8,7 @@
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include "winbase.h" #include "winbase.h"
#include "server.h" #include "wine/server.h"
#include "winerror.h" #include "winerror.h"
#include "debugtools.h" #include "debugtools.h"

View File

@ -7,7 +7,7 @@
#include <assert.h> #include <assert.h>
#include "winerror.h" #include "winerror.h"
#include "winbase.h" #include "winbase.h"
#include "server.h" #include "wine/server.h"
/*********************************************************************** /***********************************************************************

View File

@ -20,7 +20,7 @@
#include "file.h" #include "file.h"
#include "thread.h" #include "thread.h"
#include "winerror.h" #include "winerror.h"
#include "server.h" #include "wine/server.h"
#include "options.h" #include "options.h"
#include "callback.h" #include "callback.h"
#include "debugtools.h" #include "debugtools.h"

View File

@ -15,7 +15,7 @@
#include "file.h" /* for DOSFS_UnixTimeToFileTime */ #include "file.h" /* for DOSFS_UnixTimeToFileTime */
#include "thread.h" #include "thread.h"
#include "winerror.h" #include "winerror.h"
#include "server.h" #include "wine/server.h"
/*********************************************************************** /***********************************************************************

View File

@ -22,7 +22,7 @@
#endif #endif
#include "wine/port.h" #include "wine/port.h"
#include "thread.h" #include "thread.h"
#include "server.h" #include "wine/server.h"
#include "winbase.h" #include "winbase.h"
#include "wine/exception.h" #include "wine/exception.h"
#include "debugtools.h" #include "debugtools.h"

View File

@ -22,7 +22,7 @@
#include "heap.h" #include "heap.h"
#include "selectors.h" #include "selectors.h"
#include "winnt.h" #include "winnt.h"
#include "server.h" #include "wine/server.h"
#include "services.h" #include "services.h"
#include "stackframe.h" #include "stackframe.h"
#include "builtin16.h" #include "builtin16.h"

View File

@ -10,7 +10,7 @@
#include "winnls.h" #include "winnls.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "file.h" /* for FILETIME routines */ #include "file.h" /* for FILETIME routines */
#include "server.h" #include "wine/server.h"
/*********************************************************************** /***********************************************************************

View File

@ -45,7 +45,7 @@
#include "winerror.h" #include "winerror.h"
#include "wincon.h" #include "wincon.h"
#include "heap.h" #include "heap.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(console); DEFAULT_DEBUG_CHANNEL(console);

View File

@ -27,7 +27,7 @@
#include "msdos.h" #include "msdos.h"
#include "miscemu.h" #include "miscemu.h"
#include "stackframe.h" #include "stackframe.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(win32); DEFAULT_DEBUG_CHANNEL(win32);

View File

@ -31,7 +31,7 @@
#include "wine/exception.h" #include "wine/exception.h"
#include "thread.h" #include "thread.h"
#include "stackframe.h" #include "stackframe.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(seh); DEFAULT_DEBUG_CHANNEL(seh);

View File

@ -23,7 +23,7 @@
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "wine/keyboard16.h" #include "wine/keyboard16.h"
#include "server.h" #include "wine/server.h"
#include "win.h" #include "win.h"
#include "heap.h" #include "heap.h"
#include "input.h" #include "input.h"

View File

@ -14,7 +14,7 @@
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "message.h" #include "message.h"
#include "winerror.h" #include "winerror.h"
#include "server.h" #include "wine/server.h"
#include "win.h" #include "win.h"
#include "heap.h" #include "heap.h"
#include "hook.h" #include "hook.h"

View File

@ -10,7 +10,7 @@
#include "wingdi.h" #include "wingdi.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "server.h" #include "wine/server.h"
#include "region.h" #include "region.h"
#include "user.h" #include "user.h"
#include "win.h" #include "win.h"

View File

@ -18,7 +18,7 @@
#include "hook.h" #include "hook.h"
#include "thread.h" #include "thread.h"
#include "debugtools.h" #include "debugtools.h"
#include "server.h" #include "wine/server.h"
#include "spy.h" #include "spy.h"
DEFAULT_DEBUG_CHANNEL(msg); DEFAULT_DEBUG_CHANNEL(msg);

View File

@ -12,7 +12,7 @@
#include "winproc.h" #include "winproc.h"
#include "message.h" #include "message.h"
#include "server.h" #include "wine/server.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(timer); DEFAULT_DEBUG_CHANNEL(timer);