Exemplo n.º 1
0
 public CalculatorAsmHookTest()
 {
     _nativeCalculator      = new NativeCalculator();
     _addFunction           = ReloadedHooks.Instance.CreateWrapper <NativeCalculator.AddFunction>((long)_nativeCalculator.Add, out _);
     _subtractFunction      = ReloadedHooks.Instance.CreateWrapper <NativeCalculator.SubtractFunction>((long)_nativeCalculator.Subtract, out _);
     _addWithBranchFunction = ReloadedHooks.Instance.CreateWrapper <NativeCalculator.AddFunction>((long)_nativeCalculator.AddWithBranch, out _);
 }
Exemplo n.º 2
0
 public CalculatorTest()
 {
     _nativeCalculator = new NativeCalculator();
     _addFunction      = ReloadedHooks.Instance.CreateWrapper <NativeCalculator.AddFunction>((long)_nativeCalculator.Add, out _);
     _subtractFunction = ReloadedHooks.Instance.CreateWrapper <NativeCalculator.SubtractFunction>((long)_nativeCalculator.Subtract, out _);
     _divideFunction   = ReloadedHooks.Instance.CreateWrapper <NativeCalculator.DivideFunction>((long)_nativeCalculator.Divide, out _);
     _multiplyFunction = ReloadedHooks.Instance.CreateWrapper <NativeCalculator.MultiplyFunction>((long)_nativeCalculator.Multiply, out _);
 }
Exemplo n.º 3
0
 public unsafe CalculatorHookTest()
 {
     _nativeCalculator      = new NativeCalculator();
     _addFunction           = ReloadedHooks.Instance.CreateWrapper <NativeCalculator.AddFunction>((long)_nativeCalculator.Add, out var addWrapper);
     _subtractFunction      = ReloadedHooks.Instance.CreateWrapper <NativeCalculator.SubtractFunction>((long)_nativeCalculator.Subtract, out _);
     _divideFunction        = ReloadedHooks.Instance.CreateWrapper <NativeCalculator.DivideFunction>((long)_nativeCalculator.Divide, out var divWrapper);
     _multiplyFunction      = ReloadedHooks.Instance.CreateWrapper <NativeCalculator.MultiplyFunction>((long)_nativeCalculator.Multiply, out var mulWrapper);
     _addWithBranchFunction = ReloadedHooks.Instance.CreateWrapper <NativeCalculator.AddFunction>((long)_nativeCalculator.AddWithBranch, out _);
 }