Building an XMR License
[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
To generate a license for Windows Media DRM to process, you must use the Extensible Media Rights (XMR) binary schema. XMR is a schema for conveying media usage rights and restrictions and needs to be licensed separately.
The important material in a license is encrypted using the public key in the Windows Media DRM certificate collection, so it is visible only to the Windows Media DRM Client Extended API subsystem. .
It is your responsibility to ensure that the license structure and policy settings are valid and consistent with the license issuer's intent, and that they conform to the compliance rules.
You should read the Windows Media DRM import compliance rules to learn the complete set of XMR objects that must be present in the license.
To pass the XMR license to the DRM subsystem, call the IWMDRMLicenseManagement::StoreLicense method. Use the following format to pass the license in the bstrLicenseResponse parameter:
<LICENSERESPONSE>
<LICENSE version="3.0.0.0">insert base64-encoded XMR license here</LICENSE>
</LICENSERESPONSE>
This string must be in Unicode format (UTF-16).
Related topics