public virtual void Dispose()
        {
            IgnoreUserConfirmationPtr = null;

            SMProcess.Native.Exited -= OnSMExited;

            try
            {
                SMHookEngine.Instance.CleanupHooks();
            }
            catch (Exception ex)
            {
                LogTo.Error(ex,
                            "Failed to cleanup SMHookEngine");
            }

            try
            {
                OnSMStoppedEvent?.Invoke(this,
                                         new SMProcessArgs(this,
                                                           SMProcess));
            }
            catch (Exception ex)
            {
                LogTo.Error(ex,
                            "An exception occured in one of OnSMStoppedEvent handlers");
            }
        }
        public void OnSMStopped()
        {
            _sm = null;

            try
            {
                OnSMStoppedEvent?.Invoke(this, null);
            }
            catch (Exception ex)
            {
                LogTo.Error(ex, "Exception thrown while notifying subscribers of OnSMStoppedEvent. Killing process");
                System.Diagnostics.Process.GetCurrentProcess().Kill();
            }
        }
Exemplo n.º 3
0
        public void OnSMStopped()
        {
            _sm = null;

            OnSMStoppedEvent?.Invoke(this, null);
        }