The Dismount method dismounts a mounted volume.

 HRESULT Dismount(
   [in] long bForce,
   [in] long bPermanent
 );

bForce: A Boolean that determines whether the current volume is dismounted unconditionally, even if the volume is in use.

bPermanent: A Boolean that determines whether a volume MUST be dismounted permanently by taking the volume offline after dismounting it.

Return Values: The method MUST return zero or a non-error HRESULT (as specified in [MS-ERREF]) to indicate success, or return an implementation-specific nonzero error code to indicate failure. For the HRESULT values predefined by the Virtual Disk Service Remote Protocol, see section 2.2.3.

When the server receives this message, it MUST validate the following:

The server MUST then perform the following in sequence: