Here are the accompanying examples for Effective Minidumps article.
List of examples
|CallbackOrder.cpp||This example shows the order of calls to MiniDumpCallback function.|
|WriteUserStream.cpp||This example shows how to write a user data stream into the minidump.|
|ReadUserStream.cpp||This example shows how to use MiniDumpReadDumpStream function to read a user data stream from the minidump.|
|TinyDump.cpp||This example shows how to create the smallest possible minidump (more information here).|
|MiniDump.cpp||This example shows how to create a small but useful minidump (more information here).|
|MidiDump.cpp||This example shows how to create a relatively large but very informative minidump (more information here)|
|MaxiDump.cpp||This example shows how to create a minidump that contains all possible kinds of information (more information here)|
The following steps are needed to build the examples:
1. Find the latest versions of DbgHelp.dll, DbgHelp.h and DbgHelp.lib files.
The latest versions of these files are always available with Debugging Tools for Windows package. Download and install Debugging Tools for Windows (when installing, choose custom installation and install SDK).
2. Configure Visual Studio to find DbgHelp.h and DbgHelp.lib files.
These files are supplied with Visual Studio and Platform SDK, but it is necessary to use the latest files – the files that come with Debugging Tools for Windows. Thus it is necessary to configure Visual Studio include and library directories so that the latest files will be found first.
Use the following directories:
Include -> %DebuggingTools%\sdk\inc
Library -> %DebuggingTools%\sdk\lib\i386
3. Create a project and add an example file to the project.
4. When the project is built, make sure that the executable can find the latest version of DbgHelp.dll.
Copy DbgHelp.dll from the installation directory of Debugging Tools for Windows to the directory where the example executable resides.