protected override void OnStart() { if (_window == null) { _window = HookWindow.IncrementRefCount(); } }
protected override void OnStop() { if (_window != null) { HookWindow.DecrementRefCount(); } _window = null; }
public static HookWindow IncrementRefCount() { lock (StaticSyncRoot) { if (_instance == null) { _instance = new HookWindow(); } ++_references; } return(_instance); }
public HookNativeWindow(HookWindow owner) { _owner = owner; }