Skip to main content
IWMDRMWriter interface

[IWMDRMWriter is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use Microsoft PlayReady. ]

The IWMDRMWriter interface provides support for applying DRM protection to content in ASF files. You can use this interface to set various DRM file attributes and run-time properties, and to generate DRM keys for encrypting the content and the DRM header, without needing to call functions external to the Windows Media Format SDK. Prior to Windows Media 9 Series, it was necessary to use the Windows Media Rights Manager SDK to apply protection to files. The ability to protect files "on the fly" as you write them enables scenarios such as "Live DRM" in which live streaming content, such as a pay-per-view sports event or concert, can be delivered over the Internet.

An IWMDRMWriter interface exists for every writer object. You can obtain a pointer to an instance of this interface by calling the QueryInterface method of any interface in a writer object.


The IWMDRMWriter interface inherits from the IUnknown interface. IWMDRMWriter also has these types of members:


The IWMDRMWriter interface has these methods.


Generates a DRM key ID that will be used in conjunction with a key seed to encrypt and decrypt files.


Generates a DRM key seed that will be used in conjunction with a key ID to create protected files.


Generates a public and a private key that will be used to sign the ASF header object.


Sets DRM header attributes as well as other DRM run-time properties.


For information on other interfaces that can be obtained by using the QueryInterface method of this interface, see Writer Object.


Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

See also

DRM Attribute List
DRM Properties
IWMDRMWriter2 Interface
Writer Object