-
Notifications
You must be signed in to change notification settings - Fork 382
Description
Background and Motivation
I have a program that calls into the WriteDump apis (A Windows Forms application). It used to call into MiniDumpWriteDump directly but the client package fixed where it would 100% of the time return the win32 error code ERROR_PARTIAL_COPY
. As such that was the motivation to move it to the client package to remove that error code rate entirely. However it is intrusive if the end user of my programs sees a console that says where the dump was generated at, when the program I made should tell them before it exits using the MessageBox apis.
Proposed Feature
I would like an additional parameter to be added to the functions (bool showDumpConsole
) but could be made into an optional parameter by adding = true
to it to default it to true.
Usage Examples
var diagnosticsClient = new DiagnosticsClient(SettingsFile.ThisProcessId);
try
{
diagnosticsClient.WriteDump((DumpType)MiniDumpAttribute.CurrentInstance.DumpType, MiniDumpAttribute.CurrentInstance.DumpFileName, showDumpConsole: false);
// trigger an event saying where the dump is located at.
}
catch (ServerErrorException ex)
{
// trigger an event saying the dump failed.
}
I use code like this in 1 of my libraries, of which myself and others use it as well.