private static extern bool MiniDumpWriteDump_internal(IntPtr hProcess, int ProcessId, SafeHandle hFile, MinidumpTypes DumpType, ref MINIDUMP_EXCEPTION_INFORMATION ExceptionParam, IntPtr UserStreamParam, IntPtr CallackParam);
internal static int MiniDumpWriteDump(IntPtr hProcess, int ProcessId, SafeHandle hFile, MinidumpTypes DumpType, ref MINIDUMP_EXCEPTION_INFORMATION ExceptionParam, IntPtr UserStreamParam, IntPtr CallackParam) { _ = MiniDumpWriteDump_internal(hProcess, ProcessId, hFile, DumpType, ref ExceptionParam, UserStreamParam, CallackParam); return(Marshal.GetLastWin32Error()); }