WMEncProfile2.Compare
The Compare method compares one profile object to another, indicating whether the profiles are identical and whether one profile is a subset of the other.
Syntax
Boolean = WMEncProfile2.Compare(CompObj, pfSubset)
Parameters
CompObj
[in] Specifies a WMEncProfile2 object to compare to.
pfSubset
[out] Returns a Boolean indicating whether the WMEncProfile2 object is a subset of CompObj.
Return Values
This method returns two Boolean values indicating whether the profiles are equal, and whether one is a subset of the other.
Remarks
The first Boolean indicates whether the profiles are equal. If there are any differences between the profiles (such as a different codec, audio format, video size, or text for the name or description), False is returned.
The second Boolean, pfSubset, indicates whether the calling object is a subset of the second object, CompObj. For example, profile A contains 3 audiences. Profile B is the same as profile A, but has one additional audience, so profile A is a subset of profile B.
Example Code
' Create two WMEncProfile2 objects.
Dim ProA As WMEncProfile2, ProB As WMEncProfile2
Set ProA = New WMEncProfile2
Set ProB = New WMEncProfile2
' Set each profile object equal to an existing saved profile.
ProA.LoadFromFile "C:\Profiles\CustomProfileA.prx"
ProB.LoadFromFile "C:\Profiles\CustomProfileB.prx"
' Declare variables and compare profiles A and B.
Dim bEqual As Boolean, bSubset As Boolean
bEqual = ProA.Compare(ProB, bSubset)
' If bEqual is True, profiles A and B are equal.
' If bSubset is True, profile A is a subset of profile B.
Requirements
Reference: Windows Media Encoder
Library: wmenc.exe
See Also