From c528cfd5f062982f0efb46c3d49d7ec4088114fb Mon Sep 17 00:00:00 2001 From: "Travis J. Gutjahr" <33809229+Squirrelies@users.noreply.github.com> Date: Tue, 12 Feb 2019 21:59:41 -0600 Subject: [PATCH] Potential fix for 299 PARTIAL COPY issues some users are facing. --- RE2REmakeSRT/GameMemory.cs | 3 ++- RE2REmakeSRT/Program.cs | 2 +- RE2REmakeSRT/Properties/AssemblyInfo.cs | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/RE2REmakeSRT/GameMemory.cs b/RE2REmakeSRT/GameMemory.cs index d1e49d6..85b1396 100644 --- a/RE2REmakeSRT/GameMemory.cs +++ b/RE2REmakeSRT/GameMemory.cs @@ -63,7 +63,8 @@ public GameMemory(Process proc) { gameVersion = REmake2VersionDetector.GetVersion(proc); memoryAccess = new ProcessMemory.ProcessMemory(proc.Id); - BaseAddress = proc.MainModule.BaseAddress.ToInt64(); + BaseAddress = NativeWrappers.GetProcessBaseAddress(proc.Id).ToInt64(); // Bypass .NET's managed solution for getting this and attempt to get this info ourselves via PInvoke since some users are getting 299 PARTIAL COPY when they seemingly shouldn't. This is built as x64 only and RE2 is x64 only to my knowledge. + //BaseAddress = proc.MainModule.BaseAddress.ToInt64(); // Setup the pointers. switch (gameVersion) diff --git a/RE2REmakeSRT/Program.cs b/RE2REmakeSRT/Program.cs index e85d979..af92b98 100644 --- a/RE2REmakeSRT/Program.cs +++ b/RE2REmakeSRT/Program.cs @@ -105,7 +105,7 @@ public static void Main(string[] args) } catch (Exception ex) { - string exception = string.Format("{0} - Program.cs caught an exception that was not handled deeper in the code.\r\n\r\n[{1}] {2}\r\n{3}.", srtVersion, ex.GetType().ToString(), ex.Message, ex.StackTrace); + string exception = string.Format("[{0}] An unhandled exception has occurred. Please see below for details.\r\n\r\n[{1}] {2}\r\n{3}.", srtVersion, ex.GetType().ToString(), ex.Message, ex.StackTrace); Environment.FailFast(exception, ex); } } diff --git a/RE2REmakeSRT/Properties/AssemblyInfo.cs b/RE2REmakeSRT/Properties/AssemblyInfo.cs index 3cd0a2a..6d4d630 100644 --- a/RE2REmakeSRT/Properties/AssemblyInfo.cs +++ b/RE2REmakeSRT/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.8.0")] -[assembly: AssemblyFileVersion("1.1.8.0")] +[assembly: AssemblyVersion("1.1.8.1")] +[assembly: AssemblyFileVersion("1.1.8.1")]