示例#1
0
 public override void InitializeComInterfaces()
 {
     base.InitializeComInterfaces();
     if (this.drive == null)
     {
         try
         {
             this.drive = (IVdsDrive)base.ComUnknown;
         }
         catch (InvalidCastException exception)
         {
             throw new VdsException("QueryInterface for IVdsDrive failed.", exception);
         }
     }
     if (this.maintenance == null)
     {
         try
         {
             this.maintenance = (IVdsMaintenance)base.ComUnknown;
         }
         catch (InvalidCastException)
         {
         }
     }
 }
示例#2
0
 public Drive()
 {
     this.refresh = true;
     this.drive   = null;
 }