Partager via


Service Provider Interfaces

banner art

This section describes the COM interfaces that make up the service provider plug-in module, which enables Windows Media® Device Manager to enumerate and control media devices and storages. These interfaces are implemented by the service provider, and are acquired by Windows Media Device Manager. Applications do not deal with service provider interfaces directly. Hence, in the rest of this document, the word "client" in the context of service providers implies Windows Media Device Manager.

The IMDServiceProvider interface is the top-level interface of the service provider. It is the first interface accessed by Windows Media Device Manager, and it is used to acquire the IMDSPEnumDevices interface. All other service provider interfaces can be derived from the IMDServiceProvider interface.

Media devices do not necessarily implement all of the interfaces listed in this section. For example, a media device that does not have on-board storage does not implement the interfaces that are used to control or expose content.

The service provider automates operations, such as opening and closing media devices and storage objects on media devices. When Windows Media Device Manager acquires an interface for a media device, that media device is open, and the methods of the interface representing it can be called. When the application is finished with the interface, it must call the standard COM Release method of the interface, which closes the media device and releases the interface.

This is true for all of the interfaces that make up the service provider. This means that it is not only important to properly release service provider interfaces as operating system resources, but also to properly close devices and storage objects.

A service provider can include the following interfaces.

Interface Description
IMDServiceProvider Provides the client (usually Windows Media Device Manager) with a device enumerator for the devices that this service provider supports.
IMDServiceProvider2 Extends IMDServiceProvider by providing a method for creating the device by using the device path.
IMDServiceProvider3 Extends IMDServiceProvider2 by providing a method for setting the device enumeration preferences.
IMDSPDevice Provides an instance-based association with a media device. Using this interface, the client can enumerate the storage media enumerators for the device, get information about the device, and send opaque (pass-through) commands to the device.
IMDSPDevice2 Extends IMDSPDevice by providing methods for getting extended video formats, getting Plug and Play (PnP) device names, enabling the use of property pages, and making it possible to get a pointer to a storage medium from its name. This interface is optional for the service provider but is recommended.
IMDSPDevice3 Extends IMDSPDevice2 by providing ability to query properties and capabilities of the device with regard to an object format.
IMDSPDeviceControl Provides methods for controlling devices.
IMDSPDirectTransfer Enables Windows Media Device Manager to delegate content transfer to the service provider. In this case Windows Media Device Manager does not do any processing of the content before sending it to the service provider. The service provider gets full control of the source.
IMDSPEnumDevice Enumerates the media devices supported by this service provider.
IMDSPEnumStorage Enumerates the storage media on a device and the contents on a storage medium. It can be acquired either through IMDSPDevice or through IMDSPStorage. If it is acquired through IMDSPDevice, it enumerates top level storages on the device. If it is acquired through IMDSPStorage, it enumerates the nested storages.
IMDSPObject IMDSPObject contains methods for data transfer operations on a storage object.
IMDSPObject2 Extends IMDSPObject by providing more efficient transmission of DRM-enabled data.
IMDSPObjectInfo Sets or gets play length, play position, play offset, or total length of playable objects on a storage medium.
IMDSPRevoked Retrieves the URL from which updated components can be downloaded.
IMDSPStorage Provides an instanced-based association with a storage medium on a device. This interface creates storage objects, retrieves information about them, and provides access to the IMDSPEnumStorage interface for enumerating subfolders nested within the current storage.
IMDSPStorage2 Extends IMDSPStorage by getting and setting extended attributes and making it possible to get a pointer to storage from its name.
IMDSPStorage3 Extends IMDSPStorage2 by supporting metadata.
IMDSPStorage4 Extends IMDSPStorage3 by supporting playlist objects.
IMDSPStorageGlobals Retrieves global information about a storage medium. This can include the amount of free space, the total number of files, and so on.
IWMDRMDevice Enables a secure content provider to communicate with devices that use Windows Media DRM 10 for Portable Devices. This interface is implemented by a service provider that supports Windows Media DRM 10 for Portable Devices.
IWMDRMDevice2 Extends IWMDRMDevice by providing methods to get the license state and a partial synchronization list.

See Also