|Microsoft DirectX 9.0|
The SetMediaLength2 method specifies the duration of the source file.
object.SetMediaLength2( Length As Double )
Media length, in seconds.
If the method fails, an error is raised.
You can avoid potential rendering errors by setting the media length before you set the media stop time. When you set the media stop time, DES checks it against the media length.
This method does not validate the Length parameter, but the value must equal the actual duration of the source file. Obtain the source file duration by retrieving the MediaDet.StreamLength property.