[IMAGEHLP] Fix ImageLoad
Christian Costa
titan.costa at wanadoo.fr
Sun Aug 17 08:43:14 CDT 2003
Hi,
This patch fixes ImageLoad and makes Cubase VST/32 5 to launch.
Bye,
Christian
Changelog :
Allocate space to contain the IMAGE_NT_HEADERS structure (ImageLoad
function).
Add some more traces.
Christian Costa titan.costa at wanadoo.fr
-------------- next part --------------
Index: access.c
===================================================================
RCS file: /home/wine/wine/dlls/imagehlp/access.c,v
retrieving revision 1.16
diff -u -r1.16 access.c
--- access.c 27 Jun 2003 22:24:23 -0000 1.16
+++ access.c 17 Aug 2003 13:32:19 -0000
@@ -123,8 +123,14 @@
*/
PLOADED_IMAGE WINAPI ImageLoad(LPSTR DllName, LPSTR DllPath)
{
- PLOADED_IMAGE pLoadedImage =
- HeapAlloc(IMAGEHLP_hHeap, 0, sizeof(LOADED_IMAGE));
+ PLOADED_IMAGE pLoadedImage;
+
+ FIXME("(%s, %s): stub\n", DllName, DllPath);
+
+ pLoadedImage = HeapAlloc(IMAGEHLP_hHeap, 0, sizeof(LOADED_IMAGE));
+ if (pLoadedImage)
+ pLoadedImage->FileHeader = HeapAlloc(IMAGEHLP_hHeap, 0, sizeof(IMAGE_NT_HEADERS));
+
return pLoadedImage;
}
@@ -133,6 +139,7 @@
*/
PIMAGE_NT_HEADERS WINAPI ImageNtHeader(PVOID Base)
{
+ TRACE("(%p)\n", Base);
return (PIMAGE_NT_HEADERS)
((LPBYTE) Base + ((PIMAGE_DOS_HEADER) Base)->e_lfanew);
}
@@ -168,6 +175,9 @@
BOOL WINAPI ImageUnload(PLOADED_IMAGE pLoadedImage)
{
LIST_ENTRY *pCurrent, *pFind;
+
+ TRACE("(%p)\n", pLoadedImage);
+
if(!IMAGEHLP_pFirstLoadedImage || !pLoadedImage)
{
/* No image loaded or null pointer */
@@ -215,6 +225,9 @@
HMODULE hModule = NULL;
PIMAGE_NT_HEADERS pNtHeader = NULL;
+ TRACE("(%s, %s, %p, %d, %d)\n", pszImageName, pszDllPath, pLoadedImage,
+ bDotDll, bReadOnly);
+
/* PathCombine(&szFileName, pszDllPath, pszImageName); */
/* PathRenameExtension(&szFileName, bDotDll?:"dll":"exe"); */
More information about the wine-patches
mailing list