3.4.5.2.31.1 IVdsRemovable::QueryMedia (Opnum 3)
The QueryMedia method identifies the media in the drive.
-
HRESULT QueryMedia();
This method has no parameters.
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.
ERROR_SUCCESS (0x00000000)
When the server receives this message, it MUST perform the following:
Refresh any cached disk and volume properties of the removable media drive.
If the disk properties (VDS_DISK_PROP values) for the media have changed, for each callback object registered in the list of callback objects, call the callback object's IVdsAdviseSink::OnNotify method with a VDS_NOTIFICATION structure with the following attributes:
objectType member is VDS_NTT_DISK.
Disk member is a VDS_DISK_NOTIFICATION with the following attributes:
ulEvent is VDS_NF_DISK_MODIFY.
diskId is the VDS_OBJECT_ID of this disk object.
If the volume properties (VDS_VOLUME_PROP values) for the media have changed, for each callback object registered in the list of callback objects, call the callback object's IVdsAdviseSink::OnNotify method with a VDS_NOTIFICATION structure with the following attributes:
objectType member is VDS_NTT_VOLUME.
Volume member is a VDS_VOLUME_NOTIFICATION with the following attributes:
ulEvent is VDS_NF_VOLUME_MODIFY.
volumeId is the VDS_OBJECT_ID of the volume object corresponding to the removable media drive.
plexId is NULL GUID, but it is not relevant when ulEvent is VDS_NF_VOLUME_MODIFY.
ulPercentCompleted range is 0-100 and is implementation-specific; however, it is not relevant when ulEvent is VDS_NF_VOLUME_MODIFY.
Return an HRESULT indicating failure or success.