Creating Protected Files

[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 create protected digital media files using either DRM version 1 or DRM versions 7 and later, link to the WMStubDRM.lib file that you obtained from Microsoft, and create the writer object. For version 1 protection, use the IWMHeaderInfo interface to set the DRM attributes you want to apply. For versions 7 and later, use the IWMDRMWriter interface methods.

The following topics describe in detail how to protect files.


DRM is not supported by the x64-based version of this SDK.


DRM Attribute List

DRM Properties

DRM Versions

Enabling DRM Support

Obtaining the Required DRM Library

Reading Protected Files