From 370d15e8d99c2e1b7ddaa83000ca873b6fb8016e Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Fri, 8 Jan 2021 22:11:25 +0100 Subject: [PATCH] C++: Add il2cpp_thread_attach in Run() --- Il2CppInspector.Common/Properties/Resources.Designer.cs | 3 ++- Il2CppInspector.Common/Properties/Resources.resx | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Il2CppInspector.Common/Properties/Resources.Designer.cs b/Il2CppInspector.Common/Properties/Resources.Designer.cs index 2281fd2..905eb8d 100644 --- a/Il2CppInspector.Common/Properties/Resources.Designer.cs +++ b/Il2CppInspector.Common/Properties/Resources.Designer.cs @@ -238,7 +238,8 @@ namespace Il2CppInspector.Properties { ///// Custom injected code entry point ///void Run() ///{ - /// // If you would like to write to a log file, specify the name above and u [rest of string was truncated]";. + /// // Initialize thread data - DO NOT REMOVE + /// il2cpp_thread_attach(il2cpp [rest of string was truncated]";. /// internal static string Cpp_MainCpp { get { diff --git a/Il2CppInspector.Common/Properties/Resources.resx b/Il2CppInspector.Common/Properties/Resources.resx index d4ea1a0..9a12310 100644 --- a/Il2CppInspector.Common/Properties/Resources.resx +++ b/Il2CppInspector.Common/Properties/Resources.resx @@ -273,6 +273,9 @@ extern const LPCWSTR LOG_FILE = L"il2cpp-log.txt"; // Custom injected code entry point void Run() { + // Initialize thread data - DO NOT REMOVE + il2cpp_thread_attach(il2cpp_domain_get()); + // If you would like to write to a log file, specify the name above and use il2cppi_log_write() // il2cppi_log_write("Startup");