IWMEncProfileCollection.ProfileDirectory

Windows Media Encoder SDK banner art

The ProfileDirectory property specifies and retrieves the location where custom profiles are stored.

Syntax

string = IWMEncProfileCollection.ProfileDirectory;
IWMEncProfileCollection.ProfileDirectory = string;

Parameters

This property takes no parameters.

Property Value

A String containing the path to the custom profile directory.

Remarks

Use the ProfileDirectory property to specify where to get custom profiles for the current encoding session. In order for custom profiles to be included in the profile collection, and therefore available for encoding content, they must be located in the custom profile directory. After you specify a different directory, use the Refresh method to update the profile collection.

The ProfileDirectory property only modifies the custom profile directory for that particular encoding session. To change this directory permanently, or to view the default directory, see the registry key My Computer\HKEY_CLASSES_ROOT\Software\Microsoft\Windows Media Tools\Encoder\ProfileMgr\Directory.

The file name extension for profiles is .prx.

Example Code

using WMEncoderLib;

try
{
// Create a WMEncoder object.
  WMEncoder Encoder;
  Encoder = new WMEncoder();

// Retrieve an IWMEncProfileCollection object.
  IWMEncProfileCollection ProColl;
  ProColl = Encoder.ProfileCollection;

// Change the custom profile directory for the current encoding session.
  ProColl.ProfileDirectory = "C:\\MyProfiles";
  ProColl.Refresh();
}

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

Requirements

Reference: Windows Media Encoder

Namespace: WMEncoderLib

Assembly: Interop.WMEncoderLib.dll

Library: WMEncoderLib.dll

See Also