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) { } } }
public Drive() { this.refresh = true; this.drive = null; }