using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Interop.Lmx; [ComImport] [Guid("1B690A6C-DBE6-4476-BA3F-FD00DF10BEC8")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface ISecurityChecker { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void CheckOperationPermission([In] VBGUID userId, [In][MarshalAs(UnmanagedType.LPWStr)] string securityGroup, [In] MxSecurityClassification attributeClassification, out EPERMISSION_ACCESS pPermission); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void CheckPermissionForUser([In] VBGUID userId, [In] ESECURITY_PERMISSION ePerm, out EPERMISSION_ACCESS pPermission); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void IsValidSecurityGroup([In][MarshalAs(UnmanagedType.LPWStr)] string securityGroup, out bool bValid); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void IsValidRole([In][MarshalAs(UnmanagedType.LPWStr)] string role, out bool bValidRole); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void Initialize(); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void InitializeFromStr([In][MarshalAs(UnmanagedType.BStr)] string bstrSecuritySchema); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void CheckPermissionForRoles([In][MarshalAs(UnmanagedType.Interface)] MxValue pMxValueRoles, [In] ESECURITY_PERMISSION ePerm, out EPERMISSION_ACCESS pPermission); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void GetListOfSecurityGroups([MarshalAs(UnmanagedType.Interface)] out MxValue ppMxValue); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] VBGUID GetUserID([In][MarshalAs(UnmanagedType.LPWStr)] string UserName); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] [return: MarshalAs(UnmanagedType.BStr)] string GetUserName([In] ref VBGUID userGuid); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void IsSecurityEnabled(out bool bEnable); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void GetUserNameInfo([In] ref VBGUID userGuid, [MarshalAs(UnmanagedType.BStr)] out string pUserLoginName, [MarshalAs(UnmanagedType.BStr)] out string pUserFullName, [MarshalAs(UnmanagedType.BStr)] out string pUserDomainName); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void GetAuthenticationMode(out EAUTHMODE eAuthenticationMode); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void CheckAlarmAckPermission([In] VBGUID userId, [In][MarshalAs(UnmanagedType.LPWStr)] string securityGroup, [In] ESECURITY_PERMISSION ePerm, out EPERMISSION_ACCESS pPermission); }