IWMDRMProfile.ID
The ID property retrieves the ID of the current DRM profile.
Syntax
string = IWMDRMProfile.ID;
Parameters
This property takes no parameters.
Property Value
A String containing the profile ID.
Remarks
This property is read-only.
It is recommended that you keep the DRM profile ID secure; for example, do not add this as an attribute to content headers.
Example Code
using WMEncoderLib;
try
{
// Create a WMEncoder object.
WMEncoder Encoder;
Encoder = new WMEncoder();
// Create an IWMDRMContentAuthor object.
IWMDRMContentAuthor DRM;
DRM = Encoder.EncoderDRMContentAuthor;
// Retrieve the collection of DRM profiles.
IWMDRMProfileCollection DRMProColl;
DRMProColl = DRM.DRMProfileCollection;
// Create an IWMDRMProfile object and retrieve the first DRM profile
// in the collection.
IWMDRMProfile DRMPro;
DRMPro = DRMProColl.Item(0);
// Set the DRM profile into the current encoding session. You can specify
// a key ID. If you don't, one is generated.
object vKeyID = 0;
DRM.SetSessionDRMProfile(DRMPro.ID, ref vKeyID);
// Configure the encoding session, including the sources, the output,
// and the profile, and then start encoding.
}
catch (Exception e)
{
// TODO: Handle exceptions.
}
Requirements
Reference: Windows Media Encoder
Namespace: WMEncoderLib
Assembly: Interop.WMEncoderLib.dll
Library: WMEncoderLib.dll
See Also