Exemplo n.º 1
0
        /* User Functionality */

        /// <summary>
        /// Performs a one time activation of the hook.
        /// This function should only ever be called once.
        /// </summary>
        public IAsmHook Activate()
        {
            if (!_activated)
            {
                _activated = true;
                _activateHookPatch.Apply();
                _enableHookPatch.ApplyUnsafe();
            }

            return(this);
        }
Exemplo n.º 2
0
 /// <inheritdoc />
 public void Enable()
 {
     if (IsHookActivated)
     {
         _enableHookPatch.ApplyUnsafe();
         IsHookEnabled = true;
     }
 }
Exemplo n.º 3
0
 /// <inheritdoc />
 public void Disable()
 {
     if (IsHookActivated)
     {
         _disableHookPatch.ApplyUnsafe();
         IsHookEnabled = false;
     }
 }
Exemplo n.º 4
0
 public void Disable()
 {
     _disableHookPatch.ApplyUnsafe();
     IsEnabled = false;
 }