RemoveValue() private method

private RemoveValue ( string pathname ) : void
pathname string
return void
コード例 #1
0
ファイル: Wmi.cs プロジェクト: OwenSmith/win-xenguestagent
 public virtual void Remove()
 {
     try
     {
         wmisession.RemoveValue(name);
         writefail = false;
         status    = ManagementStatus.NoError;
     }
     catch (ManagementException me)
     {
         status = me.ErrorCode;
         if (me.ErrorCode == ManagementStatus.AccessDenied)
         {
             if (!writefail)
             {
                 wmisession.Log("Remove failed: " + name + " Access Denied");
                 writefail = true;
             }
         }
         else
         {
             wmisession.Log("Remove failed: " + name + " " + me.ErrorCode.ToString());
             throw;
         }
     }
     catch {
         status = ManagementStatus.Failed;
         wmisession.Log("Remove failed: " + name);
         throw;
     }
 }