internal bool SetSecurity(ref IntPtr handle) { bool needToReset = false; if (null == securityHelper) { securityHelper = (IWmiSec) new WmiSec(); } securityHelper.SetSecurity(ref needToReset, ref handle); return(needToReset); }
internal SecurityHandler(ManagementScope theScope) { this.scope = theScope; if (null == securityHelper) { securityHelper = (IWmiSec)MTAHelper.CreateInMTA(typeof(WmiSec)); //new WmiSec(); } if (null != scope) { if (scope.Options.EnablePrivileges) { securityHelper.SetSecurity(ref needToReset, ref handle); } } }