From 56534773ea8bf8cbd07eb573909e90a3efd67443 Mon Sep 17 00:00:00 2001 From: Dedmen Miller Date: Fri, 24 Jun 2022 18:21:01 +0200 Subject: [PATCH] Add some notes to why __debugbreak's are triggering --- src/common/dllInterface.hpp | 1 + src/common/enfusionTypes.hpp | 9 +++++---- src/host | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/common/dllInterface.hpp b/src/common/dllInterface.hpp index 17c524c..9c8b884 100644 --- a/src/common/dllInterface.hpp +++ b/src/common/dllInterface.hpp @@ -106,6 +106,7 @@ export extern "C" BOOL InterceptEntryPoint(HINSTANCE const instance, if (!hLoadedLibrary) { Util::BreakToDebuggerIfPresent(); // No host?! Bad + return false; } auto& hostDllInterface = *reinterpret_cast(GetProcAddress(hLoadedLibrary, MAKEINTRESOURCEA(1))); diff --git a/src/common/enfusionTypes.hpp b/src/common/enfusionTypes.hpp index b40d5fa..e43eb76 100644 --- a/src/common/enfusionTypes.hpp +++ b/src/common/enfusionTypes.hpp @@ -241,7 +241,7 @@ export class FunctionResultHandler { if (VerifyType()) { getHelper().SetAs(value); } else - __debugbreak(); + __debugbreak(); // You passed a invalid type, the variable stored here is not the type you are trying to set it ass }; bool IsNull() const { @@ -297,7 +297,7 @@ export class FunctionArgumentsHandler { if (VerifyType(index)) { getHelper(index).SetAs(value); } else - __debugbreak(); + __debugbreak(); // You passed a invalid type, the variable stored here is not the type you are trying to set it ass }; bool IsNull(uint32_t index) const { @@ -345,7 +345,7 @@ export class ClassInstanceVariable { if (VerifyType()) { getHelper()->SetAs(value); } else - __debugbreak(); + __debugbreak(); // You passed a invalid type, the variable stored here is not the type you are trying to set it ass }; template @@ -476,7 +476,8 @@ class IScriptClassBaseSimple { virtual ~IScriptClassBaseSimple() { // UnRegister - __debugbreak(); // Cannot do that currently + Util::BreakToDebuggerIfPresent(); + //__debugbreak(); // Cannot do that currently //GDllInterface.regClass(this, {}, false); } diff --git a/src/host b/src/host index 73547e4..6ef86b1 160000 --- a/src/host +++ b/src/host @@ -1 +1 @@ -Subproject commit 73547e403a5fd45f9f61533f2a7fbb8410e94e38 +Subproject commit 6ef86b1e1ef87e4f5e4fba8c5d1d1f77583de3e8