Skip to content
Snippets Groups Projects
dosexe.h 1.26 KiB
Newer Older
Alexandre Julliard's avatar
Alexandre Julliard committed
/*
 * DOS EXE loader
 *
 * Copyright 1998 Ove Kven
 */

#ifndef __WINE_DOSEXE_H
#define __WINE_DOSEXE_H
Alexandre Julliard's avatar
Alexandre Julliard committed

#include <sys/types.h>
#include "windows.h"
#include "winnt.h"
Alexandre Julliard's avatar
Alexandre Julliard committed
#include "wintypes.h"

typedef struct _DOSTASK {
 LPVOID img;
 unsigned img_ofs;
Alexandre Julliard's avatar
Alexandre Julliard committed
 WORD psp_seg,load_seg;
 WORD init_cs,init_ip,init_ss,init_sp;
 WORD xms_seg;
Alexandre Julliard's avatar
Alexandre Julliard committed
 WORD dpmi_seg,dpmi_sel,dpmi_flag;
Alexandre Julliard's avatar
Alexandre Julliard committed
 HMODULE16 hModule;
 char mm_name[128];
 int mm_fd;
 int read_pipe,write_pipe;
 pid_t task;
} DOSTASK, *LPDOSTASK;

#if defined(linux) && defined(__i386__)
Alexandre Julliard's avatar
Alexandre Julliard committed
#define MZ_SUPPORTED

struct _NE_MODULE;

Alexandre Julliard's avatar
Alexandre Julliard committed
extern int MZ_InitTask( LPDOSTASK lpDosTask );
extern int MZ_InitMemory( LPDOSTASK lpDosTask, struct _NE_MODULE *pModule );
Alexandre Julliard's avatar
Alexandre Julliard committed
extern void MZ_KillModule( LPDOSTASK lpDosTask );
extern LPDOSTASK MZ_AllocDPMITask( HMODULE16 hModule );
Alexandre Julliard's avatar
Alexandre Julliard committed

#endif /* linux-i386 */
Alexandre Julliard's avatar
Alexandre Julliard committed

#define V86_FLAG 0x00020000

extern void (*ctx_debug_call)( int, CONTEXT* );
extern BOOL32 (*instr_emu_call)( SIGCONTEXT* );

extern void MZ_Tick( WORD handle );
extern HINSTANCE16 MZ_CreateProcess( LPCSTR name, LPCSTR cmdline, LPCSTR env, BOOL32 inherit,
Alexandre Julliard's avatar
Alexandre Julliard committed
                                     LPSTARTUPINFO32A startup, LPPROCESS_INFORMATION info );
extern int DOSVM_Enter( PCONTEXT context );

#endif /* __WINE_DOSEXE_H */