-#ifdef _WIN32
-/* These routines are normally part of the go32 dos extender.
- * We redefine them here to be calls into their Windoze equivs. */
-static void dosmemget(int offset, int length, void *buffer);
-static void dosmemput(const void *buffer, int length, int offset);
-
-/* dll entry points for w32se7kpc.dll; call kernel32 to thunk for us */
-typedef BOOL (APIENTRY * PUTREGISTER) (
- HANDLE hModule,
- LPCSTR lpsz16BitDLL,
- LPCSTR lpszInitName,
- LPCSTR lpszProcName,
- UT32PROC * ppfn32Thunk,
- FARPROC pfnUT32Callback,
- LPVOID lpBuff
- );
-
-/* dll entry points for w95e7kpc.dll and w31e7kpc.dll */
-HANDLE hWine7kpc = 0;
-
-typedef int (APIENTRY * PWIN_LOAD_E7KPC) (void);
-typedef void (APIENTRY * PWIN_UNLOAD_E7KPC) (void);
-typedef void (APIENTRY * PWIN_MEM_GET) (unsigned char *buf, int len, int offset);
-typedef void (APIENTRY * PWIN_MEM_PUT) (unsigned char *buf, int len, int offset);
-typedef void (APIENTRY * PWIN_REMOTE_DEBUG) (int val);
-
-PWIN_LOAD_E7KPC pwin_load_e7kpc=NULL;
-PWIN_UNLOAD_E7KPC pwin_unload_e7kpc=NULL;
-PWIN_MEM_GET pwin_mem_get=NULL;
-PWIN_MEM_PUT pwin_mem_put=NULL;
-PWIN_REMOTE_DEBUG pwin_remote_debug=NULL;
-
-static int last_remote_debug = 0;
-static int wine7kpc_loaded = 0;
-static void win_unload_e7kpc (void);
-
-static int win_load_e7kpc (void)
-{
- if (pwin_load_e7kpc && !wine7kpc_loaded)
- {
- wine7kpc_loaded = pwin_load_e7kpc();
- if (wine7kpc_loaded)
- make_final_cleanup(win_unload_e7kpc, 0);
- }
- return wine7kpc_loaded;
-}
-
-static void win_unload_e7kpc (void)
-{
- DBG(("win_unload_e7kpc\n"));
- if (pwin_unload_e7kpc && wine7kpc_loaded)
- pwin_unload_e7kpc();
- wine7kpc_loaded = 0;
-}
-
-static void win_mem_get (unsigned char *buf, int offset, int len)
-{
- DBG(("win_mem_get(&buf=<x%x> offset=<x%x> len=<%d>)\n", buf, offset, len));
- if (remote_debug!=last_remote_debug && pwin_remote_debug)
- {
- pwin_remote_debug(remote_debug);
- last_remote_debug=remote_debug;
- }
- if (pwin_mem_get)
- {
- pwin_mem_get (buf, offset, len);
- }
-}
-
-static void win_mem_put (unsigned char *buf, int offset, int len)
-{
- DBG(("win_mem_put(buf=<%s> offset=<x%x> len=<%d>)\n", buf, offset, len));
- if (remote_debug!=last_remote_debug && pwin_remote_debug)
- {
- pwin_remote_debug(remote_debug);
- last_remote_debug=remote_debug;
- }
- if (pwin_mem_put)
- pwin_mem_put (buf, offset, len);
-}
-
-static void dosmemget(int offset, int length, void *buffer)
-{
- win_mem_get(buffer, offset, length);
-}
-
-static void dosmemput(const void *buffer, int length, int offset)
-{
- win_mem_put((unsigned char*)buffer, offset, length);
-}
-
-#endif /* _WIN32 */