示例#1
0
        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);
        }
示例#2
0
 internal static extern bool MiniDumpWriteDump(
     IntPtr hProcess,
     int processId,
     SafeFileHandle hFile,
     WindowsErrorReporting.MiniDumpType dumpType,
     IntPtr exceptionParam,
     IntPtr userStreamParam,
     IntPtr callackParam);