DRM Import Examples

[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.]

This topic contains code examples which demonstrate how to accomplish the basic steps of DRM Import. All code pertaining to randomization and encryption has been left out of the examples, and replaced with comments starting with "TODO".

This section contains topics about the following examples.

Topic Description
Create Session Key Example Shows how to create a session key for encrypting the content key.
Create Content Key Example Shows how to create a content key for encrypting media samples.
Get Machine Certificate Example Shows how to retrieve the machine certificate key.
Initialize DRM Import Example Shows how to initialize a DRM writer object for importing DRM content.
Media Sample Encryption Example Shows how to encrypt media samples.

 

DRM Import