コード例 #1
0
        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");
            }
        }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
        public void OnSMStopped()
        {
            _sm = null;

            OnSMStoppedEvent?.Invoke(this, null);
        }