/// <summary> /// Sets an exclusive ACL. This means all threads that are enumerated through <paramref name="InACL"/> /// are NOT intercepted while all others are. Of course this will overwrite the existing ACL. /// </summary> /// <remarks> /// Please note that this is not necessarily the final /// negotiation result. Refer to <see cref="LocalHook.IsThreadIntercepted"/> for more information. /// In general inclusive ACLs will restrict exclusive ACLs while local ACLs will overwrite the /// global ACL. /// </remarks> /// <param name="InACL">Threads to be explicitly included in negotiation.</param> /// <exception cref="ArgumentException"> /// The limit of 128 access entries is exceeded! /// </exception> public void SetExclusiveACL(Int32[] InACL) { if (InACL == null) { m_ACL = new Int32[0]; } else { m_ACL = (Int32[])InACL.Clone(); } m_IsExclusive = true; if (m_Handle == IntPtr.Zero) { NativeAPI.LhSetGlobalExclusiveACL(m_ACL, m_ACL.Length); } else { NativeAPI.LhSetExclusiveACL(m_ACL, m_ACL.Length, m_Handle); } }