BugSplat Native C++ SDK  3.6.0.13
BugSplat API reference for native Windows applications
MiniDmpSender Class Reference

The MiniDmpSender class is used to add BugSplat crash reporting to your app. More...

#include <BugSplat.h>

Public Types

enum  _BS_MINIDUMP_TYPE {
  MiniDumpNormal = 0x00000000, MiniDumpWithDataSegs = 0x00000001, MiniDumpWithFullMemory = 0x00000002, MiniDumpWithHandleData = 0x00000004,
  MiniDumpFilterMemory = 0x00000008, MiniDumpScanMemory = 0x00000010, MiniDumpWithUnloadedModules = 0x00000020, MiniDumpWithIndirectlyReferencedMemory = 0x00000040,
  MiniDumpFilterModulePaths = 0x00000080, MiniDumpWithProcessThreadData = 0x00000100, MiniDumpWithPrivateReadWriteMemory = 0x00000200, MiniDumpWithoutOptionalData = 0x00000400,
  MiniDumpWithFullMemoryInfo = 0x00000800, MiniDumpWithThreadInfo = 0x00001000, MiniDumpWithCodeSegs = 0x00002000, MiniDumpWithoutAuxiliaryState = 0x00004000,
  MiniDumpWithFullAuxiliaryState = 0x00008000, MiniDumpWithPrivateWriteCopyMemory = 0x00010000, MiniDumpIgnoreInaccessibleMemory = 0x00020000, MiniDumpWithTokenInformation = 0x00040000,
  MiniDumpWithModuleHeaders = 0x00080000, MiniDumpFilterTriage = 0x00100000, MiniDumpWithAvxXStateContext = 0x00200000, MiniDumpValidTypeFlags = 0x003fffff
}
 
typedef enum MiniDmpSender::_BS_MINIDUMP_TYPE BS_MINIDUMP_TYPE
 

Public Member Functions

 MiniDmpSender (__wchar_t const *szDatabase, __wchar_t const *szApp, __wchar_t const *szVersion, __wchar_t const *szAppIdentifier=NULL, DWORD dwFlags=0x04)
 
bool enableExceptionFilter (bool enable=true)
 
bool isExceptionFilterEnabled () const
 Returns the current state of the unhandled exception filter, ie the last value sent to enableExceptionFilter.
 
MiniDmpSender::BS_MINIDUMP_TYPE getMiniDumpType () const
 Get the current minidump type.
 
void setMiniDumpType (MiniDmpSender::BS_MINIDUMP_TYPE eType)
 
bool disableNetworkAccess (bool enable=true)
 
bool isNetworkAccessDisabled () const
 Returns the current network access state.
 
bool setFlags (DWORD dwFlags)
 Set the option flags; see MDSF_FLAG... defines below.
 
DWORD getFlags () const
 Get the option flags.
 
void resetVersionString (const __wchar_t *wszVersion)
 Use to change the version string at runtime.
 
void resetAppIdentifier (const __wchar_t *wszDescription)
 Use to change the generic app identifier field at runtime.
 
void setNotes (const __wchar_t *wszNotes)
 Use to set value for the Notes field in the web app.
 
void sendAdditionalFile (const __wchar_t *wszPath)
 Send additional file(s) along with the crash report; may be called repeatedly to send multiple files.
 
bool removeAdditionalFile (const __wchar_t *wszPath)
 Removes a file from the list created by sendAdditionalFile()
 
void setLogFilePath (const __wchar_t *wszPath)
 Set full path for log file; default is bugsplat.log in the TEMP% folder.
 
void setUserZipPath (const __wchar_t *wszPath)
 Use to set full path for crash report zip file; default is a path in the TEMP% folder.
 
void setResourceDllPath (const __wchar_t *wszPath)
 Use to set full path for BsSndRpt's resource DLL (allows dialog customizations, e.g. language); default is ./BugSplatRc.dll (or ./BugSplatRc64.dll).
 
void setDefaultUserName (const __wchar_t *wszName)
 Use to set the default user name. Useful for quiet-mode applications that don't prompt for user/email/description at crash time.
 
void setDefaultUserEmail (const __wchar_t *wszEmail)
 Use to set the default user email. Useful for quiet-mode applications that don't prompt for user/email/description at crash time.
 
void setDefaultUserDescription (const __wchar_t *wszDescription)
 Use to set the default user description. Useful for quiet-mode applications that don't prompt for user/email/description at crash time.
 
void createReport (EXCEPTION_POINTERS *pExcepInfo)
 
void createAsanReport (const char *asanMessage)
 Use to send an Address Sanitizer report to BugSplat.
 
void createReport (const __wchar_t *wszXmlReport)
 
void createReportAndExit ()
 Use to send a report and exit.
 
LONG unhandledExceptionHandler (PEXCEPTION_POINTERS pExceptionInfo)
 Use with MDSF_CUSTOMEXCEPTIONFILTER flag.
 
void setCallback (MiniDmpSenderCallback fnCallback)
 Use to assign a callback function for sharing additional information with the app after a crash occurs.
 
void getMinidumpPath (__wchar_t *buffer, size_t len)
 Get path to minidump.
 
int setGuardByteBufferSize (int nbytes)
 Set the size of the guard byte buffer. See the MDSF_USEGUARDMEMORY flag.
 
LPVOID imp ()
 Internal method.
 

Detailed Description

The MiniDmpSender class is used to add BugSplat crash reporting to your app.

Constructor & Destructor Documentation

◆ MiniDmpSender()

MiniDmpSender::MiniDmpSender ( __wchar_t const *  szDatabase,
__wchar_t const *  szApp,
__wchar_t const *  szVersion,
__wchar_t const *  szAppIdentifier = NULL,
DWORD  dwFlags = 0x04 
)
Parameters
szDatabasedatabase name on bugsplat.com
szAppapplication name as supplied with PDB files on bugsplat.com
szVersionversion identifier as supplied with PDB files on bugsplat.com
szAppIdentifiergeneric field to contain app details (locale, build #, etc...)
dwFlagsOption flags. see MDSF_FLAG... defines

Member Function Documentation

◆ createReport() [1/2]

void MiniDmpSender::createReport ( EXCEPTION_POINTERS *  pExcepInfo)

Use to send a BugSplat crash report outside of the unhandled exception filters. For example, you could send a report directly from your own try/catch clause.

◆ createReport() [2/2]

void MiniDmpSender::createReport ( const __wchar_t *  wszXmlReport)

Use to send a report to BugSplat, bypassing minidump creation.

See myConsoleCrasher for an example of the XML required schema. This function does not exit, normal program flow continues.

◆ disableNetworkAccess()

bool MiniDmpSender::disableNetworkAccess ( bool  enable = true)

Disable network access from BugSplat library. When a crash occurs, the minidump will be created and a message box displayed indicating path to dump file; app will then exit w/o reporting crash to BugSplat.

◆ enableExceptionFilter()

bool MiniDmpSender::enableExceptionFilter ( bool  enable = true)

To disable / enable the unhandled exception filter call this function with the desired mode This function is not valid when MDSF_PREVENTHIJACKING is used.

◆ setMiniDumpType()

void MiniDmpSender::setMiniDumpType ( MiniDmpSender::BS_MINIDUMP_TYPE  eType)

Set the minidump type. Use with care. Changing the minidump type can result in large crash file uploads that may be rejected by BugSplat.


The documentation for this class was generated from the following file: