mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 05:00:30 +00:00
imagehlp: Get rid of the custom heap.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
55a62c739c
commit
e4b2b82e6c
|
@ -35,7 +35,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(imagehlp);
|
|||
*/
|
||||
static LIST_ENTRY image_list = { &image_list, &image_list };
|
||||
|
||||
DECLSPEC_HIDDEN extern HANDLE IMAGEHLP_hHeap;
|
||||
|
||||
/***********************************************************************
|
||||
* GetImageConfigInformation (IMAGEHLP.@)
|
||||
|
@ -74,12 +73,12 @@ PLOADED_IMAGE WINAPI ImageLoad(PCSTR dll_name, PCSTR dll_path)
|
|||
|
||||
TRACE("(%s, %s)\n", dll_name, dll_path);
|
||||
|
||||
image = HeapAlloc(IMAGEHLP_hHeap, 0, sizeof(*image));
|
||||
image = HeapAlloc(GetProcessHeap(), 0, sizeof(*image));
|
||||
if (!image) return NULL;
|
||||
|
||||
if (!MapAndLoad(dll_name, dll_path, image, TRUE, TRUE))
|
||||
{
|
||||
HeapFree(IMAGEHLP_hHeap, 0, image);
|
||||
HeapFree(GetProcessHeap(), 0, image);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -121,7 +120,7 @@ BOOL WINAPI ImageUnload(PLOADED_IMAGE loaded_image)
|
|||
entry->Flink->Blink = entry->Blink;
|
||||
|
||||
UnMapAndLoad(loaded_image);
|
||||
HeapFree(IMAGEHLP_hHeap, 0, loaded_image);
|
||||
HeapFree(GetProcessHeap(), 0, loaded_image);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -25,27 +25,6 @@
|
|||
#include "imagehlp.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
/**********************************************************************/
|
||||
DECLSPEC_HIDDEN HANDLE IMAGEHLP_hHeap = NULL;
|
||||
|
||||
/***********************************************************************
|
||||
* DllMain (IMAGEHLP.init)
|
||||
*/
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
switch(fdwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls(hinstDLL);
|
||||
IMAGEHLP_hHeap = HeapCreate(0, 0x10000, 0);
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
if (lpvReserved) break;
|
||||
HeapDestroy(IMAGEHLP_hHeap);
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* MarkImageAsRunFromSwap (IMAGEHLP.@)
|
||||
|
|
Loading…
Reference in a new issue