mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: add exception handler debug
This commit is contained in:
parent
2d6de01c39
commit
e2ac9ddd43
2 changed files with 45 additions and 2 deletions
|
|
@ -56,6 +56,15 @@ namespace Dalamud
|
|||
FLASHW_TIMERNOFG = 12
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum ErrorModes : uint
|
||||
{
|
||||
SYSTEM_DEFAULT = 0x0,
|
||||
SEM_FAILCRITICALERRORS = 0x0001,
|
||||
SEM_NOALIGNMENTFAULTEXCEPT = 0x0004,
|
||||
SEM_NOGPFAULTERRORBOX = 0x0002,
|
||||
SEM_NOOPENFILEERRORBOX = 0x8000
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
@ -109,5 +118,14 @@ namespace Dalamud
|
|||
|
||||
[DllImport("kernel32", SetLastError = true, CharSet = CharSet.Ansi)]
|
||||
public static extern IntPtr LoadLibrary([MarshalAs(UnmanagedType.LPStr)]string lpFileName);
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
public static extern IntPtr SetUnhandledExceptionFilter(IntPtr lpTopLevelExceptionFilter);
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
public static extern ErrorModes SetErrorMode(ErrorModes uMode);
|
||||
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
public static extern bool DebugActiveProcess(uint dwProcessId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue