コード例 #1
0
 internal void Secure(IWbemServices services)
 {
     if (null != scope)
     {
         securityHelper.BlessIWbemServices(
             services,
             scope.Options.Username,
             scope.Options.GetPassword(),
             scope.Options.Authority,
             (int)scope.Options.Impersonation,
             (int)scope.Options.Authentication);
     }
 }
コード例 #2
0
        internal void Secure(IWbemServices wbemServices)
        {
            if (null == securityHelper)
            {
                securityHelper = (IWmiSec) new WmiSec();
            }

            securityHelper.BlessIWbemServices(
                ref wbemServices,
                options.Username,
                options.GetPassword(),
                options.Authority,
                (int)options.Impersonation,
                (int)options.Authentication);
        }