Share via


IWMDRMAttributes Interface

Windows Media Encoder SDK banner art

The IWMDRMAttributes interface manages a collection of user-defined attributes for use with digital rights management (DRM). These combinations of name-value pairs provide extra, author-defined information that is included in the header of a protected stream or file. These attributes can be used as a way for the content owner and license provider to share information. The license provider should specify to the content owner which attributes to include and the format these values should take.

The IWMDRMAttributes interface can be used to work with attributes in the DRM profile (the IWMDRMProfile interface) and the current encoding session (the IWMDRMContentAuthor interface). Changes to attributes in the DRM profile are saved and used each time the DRM profile is used.

Since IWMDRMProfile attributes are added whenever you protect content with that profile, you might add the required individualization version as a DRM profile attribute. Another useful attribute is a value that identifies you to the license provider; however, you should not add the DRM profile ID because this value should be kept secure.

Also, since IWMDRMContentAuthor attributes are for the current encoding session only, you might add the content ID or date as an attribute. If the same attribute name is used in both the DRM profile and the current encoding session, the value from the current encoding session is used.

The IWMDRMAttributes interface exposes the following property and methods.

Property Description
Count Retrieves the number of name-value pairs in the collection of DRM attributes.
Method Description
Add Adds a name-value pair to the collection of DRM attributes.
get_Name Retrieves the name of the attributes in the collection by index.
get_Value Retrieves the value of the attributes in the collection by index or name.
Item Retrieves a specific name-value pair from the collection of DRM attributes.
Remove Removes a specific name-value pair from the collection of DRM attributes.
RemoveAll Removes all name-value pairs from the collection of DRM attributes.

See Also