Share via


IWMEncDataViewCollection.length

Windows Media Encoder SDK banner art

The length property retrieves the number of IWMEncDataView objects in the collection.

Syntax

Long = IWMEncDataViewCollection.length

Parameters

This property takes no parameters.

Property Value

When getting the value, this property returns a Long containing the number of objects.

Remarks

This property is read-only. This is the JScript version of the Count method. It is included for developers more comfortable with JScript syntax.

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.length

Requirements

Reference: Windows Media Encoder Preview Control

Library: wmprevu.dll

See Also