Set the custom dialog box to the bottom of the Z-order.
[wine.git] / dlls / win32s / w32sys.c
blob125ea8af92ff4a91a80c9e3ff7f92414cb3d3f53
1 /*
2 * W32SYS
3 * helper DLL for Win32s
5 * Copyright (c) 1996 Anand Kumria
6 */
8 #include <unistd.h>
10 #include "windef.h"
11 #include "wine/windef16.h"
12 #include "wine/winbase16.h"
13 #include "debugtools.h"
15 DEFAULT_DEBUG_CHANNEL(dll);
17 typedef struct
19 BYTE bMajor;
20 BYTE bMinor;
21 WORD wBuildNumber;
22 BOOL16 fDebug;
23 } WIN32SINFO, *LPWIN32SINFO;
25 /***********************************************************************
26 * GetWin32sInfo (W32SYS.12)
27 * RETURNS
28 * 0 on success, 1 on failure
30 WORD WINAPI GetWin32sInfo16(
31 LPWIN32SINFO lpInfo /* [out] Win32S special information */
32 ) {
33 lpInfo->bMajor = 1;
34 lpInfo->bMinor = 3;
35 lpInfo->wBuildNumber = 0;
36 lpInfo->fDebug = FALSE;
38 return 0;
41 /***********************************************************************
42 * GetW32SysVersion16 (W32SYS.5)
44 WORD WINAPI GetW32SysVersion16(void)
46 return 0x100;
49 /***********************************************************************
50 * GetPEResourceTable (W32SYS.7)
51 * retrieves the resourcetable from the passed filedescriptor
52 * RETURNS
53 * dunno what.
55 WORD WINAPI GetPEResourceTable16(
56 HFILE16 hf /* [in] filedescriptor to opened executeable */
57 ) {
58 return 0;
61 /***********************************************************************
62 * LoadPeResource
64 DWORD WINAPI LoadPeResource16(WORD x,SEGPTR y) {
65 FIXME("(0x%04x,0x%08lx),stub!\n",x,y);
66 return 0;
70 /**********************************************************************
71 * IsPeFormat16 (W32SYS.2)
72 * Checks the passed filename if it is a PE format executeable
73 * RETURNS
74 * TRUE, if it is.
75 * FALSE if not.
77 BOOL16 WINAPI IsPeFormat16( LPSTR fn, /* [in] filename to executeable */
78 HFILE16 hf16 ) /* [in] open file, if filename is NULL */
80 BOOL16 ret = FALSE;
81 IMAGE_DOS_HEADER mzh;
82 OFSTRUCT ofs;
83 DWORD xmagic;
84 HFILE hf;
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);
95 done:
96 if (fn) _lclose(hf);
97 return ret;