AcTools.Windows.Input.KeyboardListener.UnsubscribeInner C# (CSharp) 메소드

UnsubscribeInner() 개인적인 정적인 메소드

private static UnsubscribeInner ( KeyboardListener instance ) : void
instance KeyboardListener
리턴 void
        private static void UnsubscribeInner(KeyboardListener instance) {
            if (Subscribed.Remove(instance) && Subscribed.Count == 0 && _hookHandle != 0) {
                var result = User32.UnhookWindowsHookEx(_hookHandle);
                _hookHandle = 0;
                _hookProc = null;

                AcToolsLogging.Write("Unsubscribed: " + result);
                if (result == 0) throw new Win32Exception(Marshal.GetLastWin32Error());
            }
        }
        #endregion