Exemple #1
0
        private IWbemPath CreateWbemPath(string path)
        {
            IWbemPath wbemPath = (IWbemPath)MTAHelper.CreateInMTA(typeof(WbemDefPath)); //new WbemDefPath();

            SetWbemPath(wbemPath, path);
            return(wbemPath);
        }
Exemple #2
0
        private IWbemPath CreateWbemPath(string path)
        {
            IWbemPath wbemPath = (IWbemPath)MTAHelper.CreateInMTA(typeof(WbemDefPath));

            ManagementPath.SetWbemPath(wbemPath, path);
            return(wbemPath);
        }
Exemple #3
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);
                }
            }
        }