必需接口和可选接口

下表描述了服务提供商实现的必需和可选接口和方法。 必须实现具有一个或多个必需方法的所有接口。 强制方法不能返回WMDM_E_NOTSUPPORTED或E_NOTIMPL。

接口和方法 实现选项
IMDServiceProvider::EnumDevices 命令的。
IMDServiceProvider::GetDeviceCount 命令的。
IMDServiceProvider2::CreateDevice 自选。 必须为 PnP 和 Windows 资源管理器支持实现此方法。
IMDSPDevice::EnumStorage 命令的。
IMDSPDevice::GetDeviceIcon 命令的。
IMDSPDevice::GetFormatSupport 命令的。
IMDSPDevice::GetManufacturer 命令的。
IMDSPDevice::GetName 命令的。
IMDSPDevice::GetPowerSource 自选。
IMDSPDevice::GetSerialNumber 自选。 对于受保护的内容传输,Windows 媒体设备管理器使用 IMDSPStorageGlobals::GetSerialNumber
IMDSPDevice::GetStatus 命令的。
IMDSPDevice::GetType 命令的。
IMDSPDevice::GetVersion 自选。
IMDSPDevice::SendOpaqueCommand 自选。
IMDSPDevice2::GetCanonicalName 自选。
IMDSPDevice2::GetFormatSupport2 命令的。
IMDSPDevice2::GetSpecifyPropertyPages 自选。
IMDSPDevice2::GetStorage 自选。
IMDSPDeviceControl 接口 自选。
IMDSPEnumDevice::Clone 命令的。
IMDSPEnumDevice::Next 命令的。
IMDSPEnumDevice::Reset 命令的。
IMDSPEnumDevice::Skip 命令的。
IMDSPEnumStorage::Clone 命令的。
IMDSPEnumStorage::Next 命令的。
IMDSPEnumStorage::Reset 命令的。
IMDSPEnumStorage::Skip 命令的。
IMDSPObject::Close 命令的。
IMDSPObject::D elete 命令的。
IMDSPObject::Move 自选。
IMDSPObject::Open 命令的。
IMDSPObject::Read 必需(如果需要 Windows Media Player 支持)。
IMDSPObject::Rename 自选。
IMDSPObject::Seek 自选。
IMDSPObject::Write 命令的。
IMDSPObjectInfo 接口 自选。
IMDSPRevoked 接口 自选。
IMDSPStorage::CreateStorage 仅当 dwAttributes WMDM_FILE_ATTR_FILE时才是必需的。
IMDSPStorage::EnumStorage 命令的。
IMDSPStorage::GetAttributes 命令的。
IMDSPStorage::GetDate 命令的。
IMDSPStorage::GetName 命令的。
IMDSPStorage::GetRights 自选。
IMDSPStorage::GetSize 命令的。
IMDSPStorage::GetStorageGlobals 命令的。
IMDSPStorage::SendOpaqueCommands 自选。
IMDSPStorage::SetAttributes 自选。
IMDSPStorage2::CreateStorage2 命令的。
IMDSPStorage2::GetAttributes2 命令的。
IMDSPStorage2::GetStorage 自选。
IMDSPStorage2::SetAttributes2 自选。
IMDSPStorage3 接口 自选。 但是,如果设备参数 UseMetadataViews 设置为 1,则必须实现此接口,并且 IMDSPStorage3::GetMetadata 变为必需,尽管 IMDSPStorage3::SetMetadata 仍为可选。
IMDSPStorageGlobals::GetCapabilities 命令的。
IMDSPStorageGlobals::GetDevice 命令的。
IMDSPStorageGlobals::GetRootStorage 命令的。
IMDSPStorageGlobals::GetSerialNumber 仅适用于 PDDRM。 可选。否则为可选。
IMDSPStorageGlobals::GetStatus 命令的。
IMDSPStorageGlobals::GetTotalBad 命令的。
IMDSPStorageGlobals::GetTotalFree 命令的。
IMDSPStorageGlobals::GetTotalSize 命令的。
IMDSPStorageGlobals::Initialize 自选。 如果设备支持此功能,则应实现此方法。 如果未实现此方法,IMDSPStorageGlobals::GetCapabilites 除了任何其他标志之外,还必须返回WMDM_STORAGECAP_NOT_INITIALIZABLE。
IMDSPDevice3IMDSPObject2
IMDSPStorage4
支持与 Windows Media Player 自动同步所必需的

创建服务提供程序