Mandatory and Optional Interfaces

banner art

The following table describes the mandatory and optional interfaces and methods for service providers to implement. All the interfaces with one or more mandatory methods must be implemented. A mandatory method cannot return WMDM_E_NOTSUPPORTED or E_NOTIMPL.

Interface and method Implementation option
IMDServiceProvider::EnumDevices Mandatory.
IMDServiceProvider::GetDeviceCount Mandatory.
IMDServiceProvider2::CreateDevice Optional. This method must be implemented for PnP and Windows Explorer support.
IMDSPDevice::EnumStorage Mandatory.
IMDSPDevice::GetDeviceIcon Mandatory.
IMDSPDevice::GetFormatSupport Mandatory.
IMDSPDevice::GetManufacturer Mandatory.
IMDSPDevice::GetName Mandatory.
IMDSPDevice::GetPowerSource Optional.
IMDSPDevice::GetSerialNumber Optional. For protected content transfer, Windows Media Device Manager uses IMDSPStorageGlobals::GetSerialNumber.
IMDSPDevice::GetStatus Mandatory.
IMDSPDevice::GetType Mandatory.
IMDSPDevice::GetVersion Optional.
IMDSPDevice::SendOpaqueCommand Optional.
IMDSPDevice2::GetCanonicalName Optional.
IMDSPDevice2::GetFormatSupport2 Mandatory.
IMDSPDevice2::GetSpecifyPropertyPages Optional.
IMDSPDevice2::GetStorage Optional.
IMDSPDeviceControl Interface Optional.
IMDSPEnumDevice::Clone Mandatory.
IMDSPEnumDevice::Next Mandatory.
IMDSPEnumDevice::Reset Mandatory.
IMDSPEnumDevice::Skip Mandatory.
IMDSPEnumStorage::Clone Mandatory.
IMDSPEnumStorage::Next Mandatory.
IMDSPEnumStorage::Reset Mandatory.
IMDSPEnumStorage::Skip Mandatory.
IMDSPObject::Close Mandatory.
IMDSPObject::Delete Mandatory.
IMDSPObject::Move Optional.
IMDSPObject::Open Mandatory.
IMDSPObject::Read Mandatory (if Windows Media Player support is desired).
IMDSPObject::Rename Optional.
IMDSPObject::Seek Optional.
IMDSPObject::Write Mandatory.
IMDSPObjectInfo Interface Optional.
IMDSPRevoked Interface Optional.
IMDSPStorage::CreateStorage Mandatory only if dwAttributes is WMDM_FILE_ATTR_FILE.
IMDSPStorage::EnumStorage Mandatory.
IMDSPStorage::GetAttributes Mandatory.
IMDSPStorage::GetDate Mandatory.
IMDSPStorage::GetName Mandatory.
IMDSPStorage::GetRights Optional.
IMDSPStorage::GetSize Mandatory.
IMDSPStorage::GetStorageGlobals Mandatory.
IMDSPStorage::SendOpaqueCommands Optional.
IMDSPStorage::SetAttributes Optional.
IMDSPStorage2::CreateStorage2 Mandatory.
IMDSPStorage2::GetAttributes2 Mandatory.
IMDSPStorage2::GetStorage Optional.
IMDSPStorage2::SetAttributes2 Optional.
IMDSPStorage3 Interface Optional. However, if the device parameter UseMetadataViews is set to 1, this interface must be implemented, and IMDSPStorage3::GetMetadata becomes mandatory, although IMDSPStorage3::SetMetadata is still optional.
IMDSPStorageGlobals::GetCapabilities Mandatory.
IMDSPStorageGlobals::GetDevice Mandatory.
IMDSPStorageGlobals::GetRootStorage Mandatory.
IMDSPStorageGlobals::GetSerialNumber Mandatory for PDDRM only. Optional otherwise.
IMDSPStorageGlobals::GetStatus Mandatory.
IMDSPStorageGlobals::GetTotalBad Mandatory.
IMDSPStorageGlobals::GetTotalFree Mandatory.
IMDSPStorageGlobals::GetTotalSize Mandatory.
IMDSPStorageGlobals::Initialize Optional. This method should be implemented if the device supports this functionality. If this method is not implemented, IMDSPStorageGlobals::GetCapabilites must return WMDM_STORAGECAP_NOT_INITIALIZABLE in addition to any other flags.
IMDSPDevice3

IMDSPObject2

IMDSPStorage4

Required to support automatic synchronization with Windows Media Player

See Also