internal static void WriteMiniDump(string file, WindowsErrorReporting.MiniDumpType dumpType) { Process currentProcess = Process.GetCurrentProcess(); using (FileStream fileStream = new FileStream(file, FileMode.Create)) WindowsErrorReporting.NativeMethods.MiniDumpWriteDump(currentProcess.Handle, currentProcess.Id, fileStream.SafeFileHandle, dumpType, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); }
internal static extern bool MiniDumpWriteDump( IntPtr hProcess, int processId, SafeFileHandle hFile, WindowsErrorReporting.MiniDumpType dumpType, IntPtr exceptionParam, IntPtr userStreamParam, IntPtr callackParam);