private IntPtr LoadLibraryAHook(string fileName) { IntPtr module = LoadLibraryA(fileName); switch (fileName.ToLower()) { case "game.dll": PluginSystem.OnGameLoad(); // Prepare the Unknown__SetState hook. Unknown__SetState = Memory.InstallHook(module + Addresses.Unknown__SetStateOffset, new Unknown__SetStateDelegate(Unknown__SetStateHook), true, false); break; } return(module); }
private IntPtr LoadLibraryAHook(String fileName) { var module = this.LoadLibraryA(fileName); switch (fileName.ToLower()) { case "game.dll": var sw = new Stopwatch(); PluginSystem.OnGameLoad(); // Prepare the Unknown__SetState hook. this.Unknown__SetState = Memory.InstallHook(module + Addresses.Unknown__SetStateOffset, new Unknown__SetStateDelegate(this.Unknown__SetStateHook), true, false); break; } return module; }