コード例 #1
0
 public override void InitializeComInterfaces()
 {
     base.InitializeComInterfaces();
     if (this.volume == null)
     {
         this.volume = InteropHelpers.QueryInterface <IVdsVolume>(base.ComUnknown);
         if (this.volume == null)
         {
             throw new VdsException("QueryInterface for IVdsVolume failed.");
         }
     }
     if (this.volumeMF == null)
     {
         this.volumeMF = InteropHelpers.QueryInterface <IVdsVolumeMF>(base.ComUnknown);
         if (this.volumeMF == null)
         {
             throw new VdsException("QueryInterface for IVdsVolumeMF failed.");
         }
     }
 }
コード例 #2
0
 public Volume()
 {
     this.refresh   = true;
     this.refreshFS = true;
     this.volume    = null;
 }