3 * helper DLL for Win32s
5 * Copyright (c) 1996 Anand Kumria
11 #include "wine/windef16.h"
12 #include "wine/winbase16.h"
13 #include "debugtools.h"
15 DEFAULT_DEBUG_CHANNEL(dll
);
23 } WIN32SINFO
, *LPWIN32SINFO
;
25 /***********************************************************************
26 * GetWin32sInfo (W32SYS.12)
28 * 0 on success, 1 on failure
30 WORD WINAPI
GetWin32sInfo16(
31 LPWIN32SINFO lpInfo
/* [out] Win32S special information */
35 lpInfo
->wBuildNumber
= 0;
36 lpInfo
->fDebug
= FALSE
;
41 /***********************************************************************
42 * GetW32SysVersion16 (W32SYS.5)
44 WORD WINAPI
GetW32SysVersion16(void)
49 /***********************************************************************
50 * GetPEResourceTable (W32SYS.7)
51 * retrieves the resourcetable from the passed filedescriptor
55 WORD WINAPI
GetPEResourceTable16(
56 HFILE16 hf
/* [in] filedescriptor to opened executeable */
61 /***********************************************************************
64 DWORD WINAPI
LoadPeResource16(WORD x
,SEGPTR y
) {
65 FIXME("(0x%04x,0x%08lx),stub!\n",x
,y
);
70 /**********************************************************************
71 * IsPeFormat16 (W32SYS.2)
72 * Checks the passed filename if it is a PE format executeable
77 BOOL16 WINAPI
IsPeFormat16( LPSTR fn
, /* [in] filename to executeable */
78 HFILE16 hf16
) /* [in] open file, if filename is NULL */
86 if (fn
) hf
= OpenFile(fn
,&ofs
,OF_READ
);
87 else hf
= DosFileHandleToWin32Handle( hf16
);
88 if (hf
== HFILE_ERROR
) return FALSE
;
89 _llseek(hf
,0,SEEK_SET
);
90 if (sizeof(mzh
)!=_lread(hf
,&mzh
,sizeof(mzh
))) goto done
;
91 if (mzh
.e_magic
!=IMAGE_DOS_SIGNATURE
) goto done
;
92 _llseek(hf
,mzh
.e_lfanew
,SEEK_SET
);
93 if (sizeof(DWORD
)!=_lread(hf
,&xmagic
,sizeof(DWORD
))) goto done
;
94 ret
= (xmagic
== IMAGE_NT_SIGNATURE
);