Example #1
0
        public void DisplayHook(Hook hook, IRunningProcess process, HookStateChangeInfo pepe)
        {
            if (!process.IsAlive()) return;

            lock (_dataLock)
            {
                process.Do(hook, (p, m, f) =>
                                     {
                                         Add(process, m, f, hook);
                                         _hookNodes[hook].UpdateState(pepe.CurrentState);
                                     });
                
            }
        }
Example #2
0
        private void HookStateChangedHandler(Hook hook, IRunningProcess aProcess, eNktHookState previousState, eNktHookState currentState)
        {
            var aStateChangeInfo = new HookStateChangeInfo(hook, aProcess, previousState, currentState);

            var aHook = aStateChangeInfo.Hook;
            if (aStateChangeInfo.CurrentState == eNktHookState.stRemoved)
            {
                _view.RemoveHook(aHook);
                _view.RemoveHookEnabled = false;
                _view.RemoveAllHooksEnabled = _spyManager.AtLeastOneHookWasCreated;
                _view.ExportHookingSettings = _spyManager.AtLeastOneHookWasCreated;
            }
            else
                _view.DisplayHookStatus(aStateChangeInfo);

            if (!aProcess.IsHooked())
                _view.DisplayRecentlyUnhookedProcess(aProcess);
            else if (aProcess.AtLeastOneHookIsActive())
                _view.DisplayRecentlyHookedProcessAsActive(aProcess);
            else
                _view.DisplayRecentlyHookedProcessAsInactive(aProcess);

            _view.RefreshModulesView();
        }
Example #3
0
 public void DisplayHookStatus(HookStateChangeInfo aHookStateChage)
 {
     AddTreeViewUpdateJob(_hooksTreeView,
                          () =>
                          _hooksTreeView.DisplayHook(aHookStateChage.Hook, aHookStateChage.Process,
                                                     aHookStateChage));
 }