The problem is that the functions which are hooked by VLD are not properly unhooked at VLD shutdown.
That means the hooked functions are called even though VLD is destroyed already and this leads to the crash.
In RestoreImport the hooked function GetProcAddress is used instead of the real GetProcAddress (_RGetProcAddress) function, so the replaced function pointers
are taken and not the original function pointers.
Comments: Indeed.
That means the hooked functions are called even though VLD is destroyed already and this leads to the crash.
In RestoreImport the hooked function GetProcAddress is used instead of the real GetProcAddress (_RGetProcAddress) function, so the replaced function pointers
are taken and not the original function pointers.
Comments: Indeed.