From d45e12a966c5bf409a66dbef4c0e45c0b41509f0 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Fri, 3 Sep 2004 17:28:39 +0000 Subject: [PATCH] Fill in the MZ header in builtin PE DLLs. --- libs/wine/loader.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libs/wine/loader.c b/libs/wine/loader.c index be83b4282a6..a7200b7abb0 100644 --- a/libs/wine/loader.c +++ b/libs/wine/loader.c @@ -275,8 +275,16 @@ static void *map_dll( const IMAGE_NT_HEADERS *nt_descr ) /* Build the DOS and NT headers */ - dos->e_magic = IMAGE_DOS_SIGNATURE; - dos->e_lfanew = sizeof(*dos); + dos->e_magic = IMAGE_DOS_SIGNATURE; + dos->e_cblp = sizeof(*dos); + dos->e_cp = 1; + dos->e_cparhdr = (sizeof(*dos)+0xf)/0x10; + dos->e_minalloc = 0; + dos->e_maxalloc = 0xffff; + dos->e_ss = 0x0000; + dos->e_sp = 0x00b8; + dos->e_lfarlc = sizeof(*dos); + dos->e_lfanew = sizeof(*dos); *nt = *nt_descr;