Share via


IWMDRMProfileCollection.Count

Windows Media Encoder SDK banner art

The Count property retrieves the number of DRM profiles in the collection.

Syntax

int = IWMDRMProfileCollection.Count;

Parameters

This property takes no parameters.

Property Value

An Int32 that indicates the number of available DRM profiles.

Remarks

This property is read-only.

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.
  IWMDRMProfile DRMPro;

// Iterate through the DRM profiles in the collection.
  for (int x = 0; x < DRMProColl.Count; x++)
  {
    DRMPro = DRMProColl.Item(x);
    MessageBox.Show(DRMPro.Name);
  }
}

catch (Exception e)
{
     // TODO: Handle exceptions.
}

Requirements

Reference: Windows Media Encoder

Namespace: WMEncoderLib

Assembly: Interop.WMEncoderLib.dll

Library: WMEncoderLib.dll

See Also