protected override void AddExtraFiles(WerSafeHandle watsonReportHandle)
 {
     if (base.ReportingAllowed && !base.ProcessHandle.IsInvalid && !base.IsFlagSet(ReportOptions.DoNotCollectDumps))
     {
         if (WatsonExceptionReport.beforeDumpCollectionAction != null)
         {
             WatsonExceptionReport.beforeDumpCollectionAction();
         }
         DiagnosticsNativeMethods.WER_DUMP_CUSTOM_OPTIONS wer_DUMP_CUSTOM_OPTIONS = new DiagnosticsNativeMethods.WER_DUMP_CUSTOM_OPTIONS();
         wer_DUMP_CUSTOM_OPTIONS.size      = Marshal.SizeOf(typeof(DiagnosticsNativeMethods.WER_DUMP_CUSTOM_OPTIONS));
         wer_DUMP_CUSTOM_OPTIONS.mask      = DiagnosticsNativeMethods.WER_DUMP_FLAGS.WER_DUMP_MASK_DUMPTYPE;
         wer_DUMP_CUSTOM_OPTIONS.dumpFlags = (DiagnosticsNativeMethods.MINIDUMP_TYPE.MiniDumpWithDataSegs | DiagnosticsNativeMethods.MINIDUMP_TYPE.MiniDumpWithHandleData | DiagnosticsNativeMethods.MINIDUMP_TYPE.MiniDumpWithUnloadedModules | DiagnosticsNativeMethods.MINIDUMP_TYPE.MiniDumpWithProcessThreadData | DiagnosticsNativeMethods.MINIDUMP_TYPE.MiniDumpWithPrivateReadWriteMemory);
         DiagnosticsNativeMethods.WerReportAddDump(watsonReportHandle, base.ProcessHandle, IntPtr.Zero, DiagnosticsNativeMethods.WER_DUMP_TYPE.WerDumpTypeMiniDump, this.exceptionInfo, wer_DUMP_CUSTOM_OPTIONS, 0U);
         DiagnosticsNativeMethods.WER_DUMP_CUSTOM_OPTIONS wer_DUMP_CUSTOM_OPTIONS2 = new DiagnosticsNativeMethods.WER_DUMP_CUSTOM_OPTIONS();
         wer_DUMP_CUSTOM_OPTIONS2.size      = Marshal.SizeOf(typeof(DiagnosticsNativeMethods.WER_DUMP_CUSTOM_OPTIONS));
         wer_DUMP_CUSTOM_OPTIONS2.mask      = DiagnosticsNativeMethods.WER_DUMP_FLAGS.WER_DUMP_MASK_DUMPTYPE;
         wer_DUMP_CUSTOM_OPTIONS2.dumpFlags = (wer_DUMP_CUSTOM_OPTIONS.dumpFlags | DiagnosticsNativeMethods.MINIDUMP_TYPE.MiniDumpWithFullMemory);
         DiagnosticsNativeMethods.WerReportAddDump(watsonReportHandle, base.ProcessHandle, IntPtr.Zero, DiagnosticsNativeMethods.WER_DUMP_TYPE.WerDumpTypeHeapDump, this.exceptionInfo, wer_DUMP_CUSTOM_OPTIONS2, 0U);
     }
 }
Ejemplo n.º 2
0
 protected override void AddExtraFiles(WerSafeHandle watsonReportHandle)
 {
     DiagnosticsNativeMethods.WerReportAddFile(watsonReportHandle, this.traceFileName, DiagnosticsNativeMethods.WER_FILE_TYPE.WerFileTypeOther, (DiagnosticsNativeMethods.WER_FILE_FLAGS) 0U);
 }
 internal static extern void WerReportAddDump([In] WerSafeHandle reportHandle, [In] ProcSafeHandle processHandle, [In][Optional] IntPtr threadHandle, [In] DiagnosticsNativeMethods.WER_DUMP_TYPE dumpType, [In][Optional] DiagnosticsNativeMethods.WER_EXCEPTION_INFORMATION exceptionParam, [In][Optional] DiagnosticsNativeMethods.WER_DUMP_CUSTOM_OPTIONS dumpCustomOptions, [In] uint flags);
 internal static extern void WerReportAddFile([In] WerSafeHandle reportHandle, [MarshalAs(UnmanagedType.LPWStr)][In] string path, [In] DiagnosticsNativeMethods.WER_FILE_TYPE fileType, [In] DiagnosticsNativeMethods.WER_FILE_FLAGS fileFlags);
 internal static extern void WerReportSetParameter([In] WerSafeHandle reportHandle, [In] uint paramID, [MarshalAs(UnmanagedType.LPWStr)][In][Optional] string name, [MarshalAs(UnmanagedType.LPWStr)][In] string value);
 internal static extern int SubmitExWatsonReport([In] WerSafeHandle reportHandle, [In] DiagnosticsNativeMethods.WER_CONSENT consent, [In] DiagnosticsNativeMethods.WER_SUBMIT_FLAGS flags, IntPtr submitResult, [In] bool fDumpRequested, [In] bool fProcessTerminating);
 internal static extern int WerReportSubmit([In] WerSafeHandle reportHandle, [In] DiagnosticsNativeMethods.WER_CONSENT consent, [In] DiagnosticsNativeMethods.WER_SUBMIT_FLAGS flags, IntPtr submitResult);