Skip to content

Invalid IMAGEHLP_MODULE64_V3 structure ending with error 87 #30

Description

@SoLaRGit

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions