feat: crash in hook debug

This commit is contained in:
goaaats 2021-10-29 21:51:25 +02:00
parent a83b39f60b
commit ac21bc761f
No known key found for this signature in database
GPG key ID: F18F057873895461

View file

@ -40,6 +40,7 @@ using Dalamud.Utility;
using ImGuiNET;
using ImGuiScene;
using Newtonsoft.Json;
using PInvoke;
using Serilog;
namespace Dalamud.Interface.Internal.Windows
@ -354,7 +355,15 @@ namespace Dalamud.Interface.Internal.Windows
private int MessageBoxWDetour(IntPtr hwnd, string text, string caption, NativeFunctions.MessageBoxType type)
{
Log.Information("[DATAHOOK] {0} {1} {2} {3}", hwnd, text, caption, type);
return this.messageBoxMinHook.Original(hwnd, text, caption, type);
var result = this.messageBoxMinHook.Original(hwnd, "Cause Access Violation?", caption, NativeFunctions.MessageBoxType.YesNo);
if (result == (int)User32.MessageBoxResult.IDYES)
{
Marshal.ReadByte(IntPtr.Zero);
}
return result;
}
private void DrawServerOpCode()