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