Take into account handle inheritance flag.
[wine] / include / dosexe.h
1 /*
2  * DOS EXE loader
3  *
4  * Copyright 1998 Ove Kåven
5  */
6
7 #ifndef __WINE_DOSEXE_H
8 #define __WINE_DOSEXE_H
9
10 #include <sys/types.h>
11 #include "windows.h"
12 #include "winnt.h"
13 #include "sig_context.h"
14 #include "wintypes.h"
15
16 typedef struct _DOSTASK {
17  LPVOID img;
18  unsigned img_ofs;
19  WORD psp_seg,load_seg;
20  WORD init_cs,init_ip,init_ss,init_sp;
21  WORD xms_seg;
22  WORD dpmi_seg,dpmi_sel,dpmi_flag;
23  WORD system_timer;
24  HMODULE16 hModule;
25  char mm_name[128];
26  int mm_fd;
27  int read_pipe,write_pipe;
28  pid_t task;
29 } DOSTASK, *LPDOSTASK;
30
31 #if defined(linux) && defined(__i386__)
32
33 #define MZ_SUPPORTED
34
35 struct _NE_MODULE;
36
37 extern int MZ_InitTask( LPDOSTASK lpDosTask );
38 extern int MZ_InitMemory( LPDOSTASK lpDosTask, struct _NE_MODULE *pModule );
39 extern void MZ_KillModule( LPDOSTASK lpDosTask );
40 extern LPDOSTASK MZ_AllocDPMITask( HMODULE16 hModule );
41
42 #endif /* linux-i386 */
43
44 #define V86_FLAG 0x00020000
45
46 extern void (*ctx_debug_call)( int, CONTEXT* );
47 extern BOOL32 (*instr_emu_call)( SIGCONTEXT* );
48
49 extern void MZ_Tick( WORD handle );
50
51 extern HINSTANCE16 MZ_CreateProcess( LPCSTR name, LPCSTR cmdline, LPCSTR env, BOOL32 inherit,
52                                      LPSTARTUPINFO32A startup, LPPROCESS_INFORMATION info );
53 extern int DOSVM_Enter( PCONTEXT context );
54
55 #endif /* __WINE_DOSEXE_H */