I use Jochen Kalmbach's StackWalker class from CodeProject, to produce a stacktrace when an exception occurs in my DLL.
It relies on DbgHelp.dll
Is DbgHelp.dll built-in to Windows Vista, WS2008, Windows 7?
I know about The Debugging Tools for Windows from Microsoft, and I'm aware that DbgHelp.dll ships in that package. But I also found DbgHelp.dll in %windir%\system32 on my machine.
If it is not installed by default, is there a way for me to redistribute it with debug builds of my DLL ?
To obtain the latest version of DbgHelp. dll, go to https://developer.microsoft.com/windows/downloads/windows-10-sdk and download Debugging Tools for Windows. Refer to Calling the DbgHelp Library for information on proper installation.
What are those DLLs? The DBGHELP. DLL analyzes debug information in a file / in a running process. For example, you can use it to do a StackWalk, find symbols for an address and similar stuff.
Microsoft says:
"The DbgHelp library is implemented by DbgHelp.dll. This DLL is included in the operating system."
Note that the version currently included with Debugging Tools for Windows may not be the same version that is included with the operating system.
It's generally best to ship dbghelp.dll with your application to ensure you get the version you're expecting anyway. I believe that it's redistributable for this very reason.
However, it's worth remembering that the debug runtime library is not redistributable. Your debug builds must still be (in VC++ terms) "release" builds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With