-
Notifications
You must be signed in to change notification settings - Fork 189
Description
Last version of dbghelp.dll is 6.12.2.633 (released 02/01/2010 | Debugging Tools for Windows 6.12)
https://docs.microsoft.com/en-us/windows/desktop/debug/dbghelp-versions
and current code missing two last fields in IMAGEHLP_MODULE64_V3 structure
// new element: 15-Jul-2009
DWORD MachineType; // IMAGE_FILE_MACHINE_XXX from ntimage.h and winnt.h
DWORD Reserved; // Padding - don't remove.
When we call this version of dbghelp.dll it fails with error 87.
If we extend structure IMAGEHLP_MODULE64_V3 with this two fields code works.
This code assumes there are only 3 versions of this structure, which is not the case.
Also one question, why try to auto detect version available on the system when there is
C:\Program Files (x86)\Debugging Tools for Windows (x86)\sdk
which could be used directly with provided dbghelp.dll, and without any overhead or dynamic instantiation of library, as this topic suggests:
https://docs.microsoft.com/en-us/windows/desktop/debug/calling-the-dbghelp-library