Search code examples
windowsdebuggingdbghelpdia

Debugging (Win): DIA versus DBGHELP


Short and concise:

What are the actual differences between DIA (Debug Interface Access) and the DBGHELP libraries? I know that DIA is COM based and seems to be extremely powerful (as well as able to be used with managed and unmanaged processes), whereas the DBGHELP seems to be very convenient to use but offers less possibilites.

Can any one explain where these two have their differences and what can be done with the one but not with the other? I am really struggling with finding some full conclusive information on the internet :(

Sorry if this seems to be a dull question, and thanks to any answers you have for me! :)

Regards PuerNoctis


Solution

  • DIA has consistent COM based interface. DbgHelp consist of a set of standard C functions.

    Here two aricles I have written about DIA (with C++ Samples), that shows the power of DIA:

    1. Symbols File Locator
    2. How to Inspect the Content of a Program Database (PDB) File

    When possible, use DIA and not DbgHelp, since DIA can be used by any COM-aware program.