次の方法で共有


Handling Protected Content

banner art

If you are building an application or service provider that will consume content protected by Windows Media digital rights management (DRM), you must have a key/certificate pair issued by Microsoft. To learn where to get this certificate, see Tools for Development. If you do not intend to handle protected content, you can use the dummy key and certificate provided with this SDK in a file named key.c.

For any file that is protected by DRM technology, Windows Media Device Manager requires the presence of a secure content provider (SCP) for that file format. Microsoft provides an SCP module for WMA and WMV files. If your application or service provider will be handling DRM-protected content of another format, you must provide your own SCP module. An SCP module is a COM object that implements all the interfaces for Secure Content Providers.

An application can send DRM-protected content to devices built on either Windows Media DRM 10 for Portable Devices, or Portable Device DRM (PDDRM). However, you can only create a service provider for devices built on PDDRM; you cannot create a service provider for devices built on Windows Media DRM 10 for Portable Devices. These latter devices can only use the Microsoft-provided MTP service provider.

Devices built on PDDRM can only support licenses for purchased content. Licenses that have time-expiration conditions are only supported by devices built on Windows Media DRM 10 for Portable Devices, which have special requirements such as a secure clock and individualization. Windows Media DRM 10 for Portable Devices SDK gives details on device requirements to support version 10 technology.

Before sending DRM content to the device, an application should verify several things:

  • That the device supports DRM technology.
  • What version of DRM technology it supports (version 10 or earlier).
  • If the device is built on version 10, that all its components are up to date (such as the secure clock and any individualization requirements).

All method calls to answer these questions are made by the client and handled by Windows Media Device Manager and the secure content provider component; the service provider does not handle any of these calls.

If the device does not support Windows Media DRM 10 for Portable Devices, it might still be able to consume protected content (depending on the content license and the device design), but any content sent to it will have a simplified use license with limited rights (for example, no time expiration).

Note   Many Windows Media Device Manager file transfer or rights requesting methods will fail (often with a mysterious HRESULT value) when handling DRM-protected files with a debugger attached. Therefore, you must use alternate ways to debug your code, such as logging outputs to a Windows form or a log file. For more information on logging options, see Enabling Logging. If you are running a debugger on protected content, a method will return one of the error codes listed in the DRM section Error Codes, or possibly an unknown error code. If you get mysterious HRESULT values when running a debugger on protected content or methods, DRM protection might be the cause.

See Also