WMEncProfileManager.LastCreatedProfile

Windows Media Encoder SDK banner art

The LastCreatedProfile property retrieves the name of the profile most recently created by the end user during the current encoding session.

Syntax

string = WMEncProfileManager.LastCreatedProfile;

Parameters

This property takes no parameters.

Property Value

A String containing the profile name.

Remarks

This property is read-only. You can use the LastCreatedProfile property to determine whether an end user has created a profile. The variable containing the name of the profile is reset when you call WMEncProfileList.

Example Code

using WMEncoderLib;

try
{
// Create a WMEncProfileManager object.
WMEncProfileManager ProfileMgr;
ProfileMgr = new WMEncProfileManager();

string sLastProfile;
string sProfileDirectory;
string sDetailsString;

// Display the dialog box that lists the profiles. Because you
// are calling WMEncProfileListEx() rather than WMEncProfileList()
// and have indicated that a new profile is audio-only, if you
// bring up the New profile dialog box, only the audio check box
// will be selected.
ProfileMgr.WMEncProfileListEx(WMENC_MEDIA_FILTER.WMENC_FILTER_AV, WMENC_MEDIA_FILTER.WMENC_FILTER_A, 0);

// Display the New Profile dialog box. If you supply the name of an
// existing profile, the new profile will be a copy of that one.
ProfileMgr.WMEncProfileEdit("Windows Media Video 8 for Local Area Network (384 Kbps)", WMENC_MEDIA_FILTER.WMENC_FILTER_AV, 0);

// Retrieve a string containing the details of a specific profile.
sDetailsString = ProfileMgr.GetDetailsString("Windows Media Video 8 for Local Area Network (384 Kbps)", 0);

// Retrieve the name of the last profile created during the current
// encoding session.
sLastProfile = ProfileMgr.LastCreatedProfile;

// Retrieve a string containing the path of the directory in which
// custom profiles are stored.
sProfileDirectory = ProfileMgr.ProfileDirectory;
}

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

Requirements

Reference: Windows Media Encoder

Namespace: WMEncoderLib

Assembly: Interop.WMEncoderLib.dll

Library: WMEncoderLib.dll

See Also