using System; using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; namespace XP.Common.Dump.Native { /// /// Windows 原生方法 P/Invoke 声明 | Windows native method P/Invoke declarations /// internal static class NativeMethods { /// /// 将进程的 Mini Dump 写入指定文件 | Write a Mini Dump of the process to the specified file /// [DllImport("dbghelp.dll", SetLastError = true)] internal static extern bool MiniDumpWriteDump( IntPtr hProcess, uint processId, SafeHandle hFile, uint dumpType, IntPtr exceptionParam, IntPtr userStreamParam, IntPtr callbackParam); } }