Skip to content

Commit

Permalink
Quick fix before next release
Browse files Browse the repository at this point in the history
  • Loading branch information
scrim-dev committed Dec 3, 2024
1 parent 797d712 commit b06d1c2
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 135 deletions.
10 changes: 6 additions & 4 deletions Catalyss/SMI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ internal class SMI
//CatalyssMod
//Entry
//Load
private static nint Cnint = 0;
public static void Inject(Injector injector)
{
byte[] Assem = File.ReadAllBytes($"{Directory.GetCurrentDirectory()}\\CatalyssMod.dll"); //Path
Expand Down Expand Up @@ -42,16 +43,17 @@ public static void Inject(Injector injector)
(injector.Is64Bit
? $"0x{remoteAssembly.ToInt64():X16}"
: $"0x{remoteAssembly.ToInt32():X8}"));

Cnint = remoteAssembly;
}
}

//Need to change this before release
public static void Eject(Injector injector)
{
//IntPtr Assem =
IntPtr Assem = nint.Parse($"0x{Cnint.ToInt64():X16}");
using (injector)
{
/*try
try
{
injector.Eject(Assem, "CatalyssMod", "Entry", "Unload");
MessageBox.Show("Ejection successful");
Expand All @@ -63,7 +65,7 @@ public static void Eject(Injector injector)
catch (Exception exc)
{
MessageBox.Show("Ejection failed (unknown error): " + exc);
}*/
}
}
}
}
Expand Down
Loading

0 comments on commit b06d1c2

Please sign in to comment.