Refuse to load if 16-bit support is missing.
This commit is contained in:
parent
dea3a11c6c
commit
84259840eb
|
@ -288,7 +288,7 @@ extern void WINAPI DOSVM_ASPIHandler(CONTEXT86*);
|
|||
extern DOSCONF *DOSCONF_GetConfig( void );
|
||||
|
||||
/* dosmem.c */
|
||||
extern void DOSMEM_InitDosMemory(void);
|
||||
extern BOOL DOSMEM_InitDosMemory(void);
|
||||
extern BOOL DOSMEM_MapDosLayout(void);
|
||||
extern WORD DOSMEM_AllocSelector(WORD); /* FIXME: to be removed */
|
||||
extern LPVOID DOSMEM_AllocBlock(UINT size, WORD* p);
|
||||
|
|
|
@ -489,14 +489,14 @@ static void DOSMEM_InitMemory(char* addr)
|
|||
*
|
||||
* When WineDOS is loaded, initializes the current DOS memory layout.
|
||||
*/
|
||||
void DOSMEM_InitDosMemory(void)
|
||||
BOOL DOSMEM_InitDosMemory(void)
|
||||
{
|
||||
HMODULE16 hModule;
|
||||
unsigned short sel;
|
||||
LDT_ENTRY entry;
|
||||
DWORD reserve;
|
||||
|
||||
hModule = GetModuleHandle16("KERNEL");
|
||||
if (!(hModule = GetModuleHandle16("KERNEL"))) return FALSE;
|
||||
/* KERNEL.194: __F000H */
|
||||
sel = LOWORD(GetProcAddress16(hModule, (LPCSTR)(ULONG_PTR)194));
|
||||
wine_ldt_get_entry(sel, &entry);
|
||||
|
@ -528,6 +528,7 @@ void DOSMEM_InitDosMemory(void)
|
|||
* Set DOS memory base and initialize conventional memory.
|
||||
*/
|
||||
DOSMEM_InitMemory(DOSMEM_dosmem + reserve);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
|
|
|
@ -703,7 +703,7 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
|
|||
if (fdwReason == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
DisableThreadLibraryCalls(hinstDLL);
|
||||
DOSMEM_InitDosMemory();
|
||||
if (!DOSMEM_InitDosMemory()) return FALSE;
|
||||
DOSVM_InitSegments();
|
||||
|
||||
event_notifier = CreateEventW(NULL, FALSE, FALSE, NULL);
|
||||
|
|
Loading…
Reference in New Issue