Esempio n. 1
0
        internal bool SetSecurity(ref IntPtr handle)
        {
            bool needToReset = false;

            if (null == securityHelper)
            {
                securityHelper = (IWmiSec) new WmiSec();
            }

            securityHelper.SetSecurity(ref needToReset, ref handle);
            return(needToReset);
        }
Esempio n. 2
0
        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);
                }
            }
        }