IWMEncDataViewCollection.Count
The Count property retrieves the number of IWMEncDataView objects in the collection.
Syntax
Long = IWMEncDataViewCollection.Count
Parameters
This property takes no parameters.
Property Value
A Long that indicates the number of objects in the collection.
Remarks
This property is read-only.
To display previews and postviews, you must add the Windows Media Encoder Preview Control reference to the project. For more information, see Programming in Visual Basic.
Example Code
' Create a WMEncoder object.
Dim Encoder As WMEncoder
Set Encoder = New WMEncoder
' Configure the encoding session including the input sources,
' the profile, and the output.
' Retrieve an IWMEncDataViewCollection object from the
' video source object to display a postview.
Dim DVColl_Postview As IWMEncDataViewCollection
Set DVColl_Postview = SrcVid.PostviewCollection
' Create a WMEncDataView object.
Dim PostView As WMEncDataView
Set PostView = New WMEncDataView
' Add the WMEncDataView object to the collection.
Dim lPostviewStream As Long
lPostviewStream = DVColl_Postview.Add(PostView)
' Retrieve the number of items in the data view collection.
Dim lDVCount as Long
lDVCount = DVColl_Postview.Count
Requirements
Reference: Windows Media Encoder Preview Control
Library: wmprevu.dll
See Also