WMEncoder.EncoderDRMContentAuthor

Windows Media Encoder SDK banner art

The EncoderDRMContentAuthor property retrieves an IWMDRMContentAuthor object that can be used to protect content using digital rights management (DRM).

Syntax

IWMDRMContentAuthor = WMEncoder.EncoderDRMContentAuthor

Parameters

This property takes no parameters.

Property Value

An IWMDRMContentAuthor object.

Remarks

This property is read-only.

The IWMDRMContentAuthor object allows you to work with DRM profiles, which contain the settings that you need to protect a stream or file. You can create, import, export, and remove DRM profiles, and specify the DRM profile to use for the current encoding session.

Example Code

' Create a WMEncoder object.
  Dim Encoder As WMEncoder
  Set Encoder = New WMEncoder

' Create an IWMDRMContentAuthor object.
  Dim DRM As IWMDRMContentAuthor
  Set DRM = Encoder.EncoderDRMContentAuthor

' Retrieve the collection of DRM profiles.
  Dim DRMProColl As IWMDRMProfileCollection
  Set DRMProColl = DRM.DRMProfileCollection

' Create an IWMDRMProfile object and retrieve the first DRM profile
' in the collection.
  Dim DRMPro As IWMDRMProfile
  Set DRMPro = DRMProColl.Item(0)

' Retrieve an IWMDRMAttributes object.
  Dim Proattr As IWMDRMAttributes
  Set Proattr = DRM.Attributes

' Display the attributes for the current encoding session.
  Dim vValue As Variant, vName As Variant
  For x = 0 To Proattr.Count - 1
    vValue = Proattr.Item(x, vName)
    MsgBox vName & ": " & vValue
  Next x

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also