Skip to content
This repository has been archived by the owner on Apr 25, 2021. It is now read-only.

Commit

Permalink
Explicitly setting ListModules's filter to check 64-bit modules only.
Browse files Browse the repository at this point in the history
Show error message to user rather than silently fail. It still shows in event viewer but now will show a message to the user.
  • Loading branch information
Squirrelies committed Feb 13, 2019
1 parent c528cfd commit d9339f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion RE2REmakeSRT/GameMemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public GameMemory(Process proc)
{
gameVersion = REmake2VersionDetector.GetVersion(proc);
memoryAccess = new ProcessMemory.ProcessMemory(proc.Id);
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 = NativeWrappers.GetProcessBaseAddress(proc.Id, ProcessMemory.PInvoke.ListModules.LIST_MODULES_64BIT).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.
Expand Down
2 changes: 2 additions & 0 deletions RE2REmakeSRT/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ public static void Main(string[] args)
}
catch (Exception ex)
{
string title = "RE2 (2019) SRT - " + srtVersion;
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);
MessageBox.Show(exception, title, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
Environment.FailFast(exception, ex);
}
}
Expand Down
4 changes: 2 additions & 2 deletions RE2REmakeSRT/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.1")]
[assembly: AssemblyFileVersion("1.1.8.1")]
[assembly: AssemblyVersion("1.1.8.2")]
[assembly: AssemblyFileVersion("1.1.8.2")]

0 comments on commit d9339f0

Please sign in to comment.