LocalHookIsThreadIntercepted Method |
Namespace: EasyHook
Exception | Condition |
---|---|
ObjectDisposedException | The underlying hook is already disposed. |
This method provides an interface to the internal negotiation algorithm. You may use it to check whether your ACL provides expected results.
The following is a pseudo code of how this method is implemented:
if(InThreadID == 0) InThreadID = GetCurrentThreadId(); if(GlobalACL.Contains(InThreadID)) { if(LocalACL.Contains(InThreadID)) { if(LocalACL.IsExclusive) return false; } else { if(GlobalACL.IsExclusive) return false; if(!LocalACL.IsExclusive) return false; } } else { if(LocalACL.Contains(InThreadID)) { if(LocalACL.IsExclusive) return false; } else { if(!GlobalACL.IsExclusive) return false; if(!LocalACL.IsExclusive) return false; } } return true;