Share via


Using WMDRM-ND from custom code

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/27/2008

If you choose to write your own application and choose not use the Media Query Engine (MQE) and the supplied sample application, you must do the following to support Microsoft Windows Media Digital Rights Management (DRM) for Network Devices from your custom application:

  • Create your own unique device name (UDN) in the registry. The UDN must be persistent. If the UDN changes, you cannot play protected content on the device any longer.
  • Manage State Variable Change messages. On the Windows Media Connect (WMC) server, the end-user selects the options to allow a device to play content or not. The user's selection triggers the State Variable Change messages. A device should implement code to handle these messages. Look at the MQE code to determine how an application calls these APIs. There is sample code in the Media Query Engine that provides the order that you should make the calls in and what you should do for each status that each call returns.
  • Create a description document and place it in a folder specified in the registry.
  • Networked media device (NMD) applications must check the res@protection attribute of each audio and video file. If the attribute contains Microsoft WM DRM, the file is DRM–protected.
  • For DRM–protected files, an extra modifier, WMDRM=1, must be added to the end of the URL that is passed to the HTTP streamer. This modifier identifies the file as being DRM–protected and is the only way for the HTTP streamer to distinguish between protected and non-protected content. DRM–protected files will not play back properly on the device if the modifier is not added.
  • You can no longer assume that a media server will throw an error when the application requests protected data. WMC throw errors as the default behavior, so some applications assume that an error code means encrypted content and try to acquire a license for it. This behavior may change in future versions of WMC, so you should not rely on it.

See Also

Concepts

Customizing WMDRM-ND
Windows Media DRM for Network Devices