Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Post-Mortem Debugging Your Application with Minidumps and Visual Studio .NET

, 6 Mar 2002
This article describes how minidumps work, how to make your application create them when it crashes, and how to read them back with Visual Studio .NET.
mdump.zip
#if _MSC_VER < 1300
#define DECLSPEC_DEPRECATED
// VC6: change this path to your Platform SDK headers
#include "M:\\dev7\\vs\\devtools\\common\\win32sdk\\include\\dbghelp.h"			// must be XP version of file
#else
// VC7: ships with updated headers
#include "dbghelp.h"
#endif

// based on dbghelp.h
typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType,
									CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
									CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
									CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam
									);

class MiniDumper
{
private:
	static LPCSTR m_szAppName;

	static LONG WINAPI TopLevelFilter( struct _EXCEPTION_POINTERS *pExceptionInfo );

public:
	MiniDumper( LPCSTR szAppName );
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Andy Pennell
Web Developer
United States United States
I'm a developer at Microsoft on Visual Studio. I am responsible for the native code debugger, the SQL debugger, plus much of the debugger's infrastructure. I've been a debugger developer at MS for six years, plus for other people many years before. Anyone used the 68k versions of HiSoft Devpac in the early 80s? That was me.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141223.1 | Last Updated 7 Mar 2002
Article Copyright 2002 by Andy Pennell
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid