WMEncProfile2.Validate
The Validate method indicates whether the settings in the current profile are valid.
Syntax
WMEncProfile2.Validate
Parameters
This method takes no parameters.
Return Values
This method does not return a value.
Remarks
The Validate method returns an error code when required settings (such as a profile name and at least one audience) are not present, and when settings are not compatible with the mode specified in the CompatibilityMode property. For example, you set the CompatibilityMode property to support Windows Media version 8 and earlier but you chose a variable bit rate (VBR) for the VBRMode property; the Validate mode results in a message when you run the application informing you that the VBR mode cannot be used with your compatibility mode.
Use the ValidateMode property to specify whether you want validation errors returned immediately as they are set, for example if you are programming with a script.
Example Code
' Create a WMEncProfile2 object.
Dim Pro As WMEncProfile2
Set Pro = New WMEncProfile2
' Turn off immediate validation.
Pro.ValidateMode = False
' Set the compatibility mode, name, and content type for the profile.
Pro.CompatibilityMode = WMENC_ENCODER_V8
Pro.Name = "My Profile"
Pro.ContentType = 17
' Add an audience with a bit rate of 512 Kbps.
Pro.AddAudience 512000
' The following statement would result in a validation error.
' Pro.VBRMode = WMENC_PVM_PEAK
' Validate the current settings.
Pro.Validate
Requirements
Reference: Windows Media Encoder
Library: wmenc.exe
See Also