Share via


IMSVidPlayback::get_Length

 
Microsoft DirectShow 9.0

IMSVidPlayback::get_Length

This topic applies to Windows XP or later.

The get_Length method retrieves the length of the playback source.

Syntax

  HRESULT get_Length(
  long*  lLength
);

Parameters

lLength

[out]  Pointer to a variable that receives the length. The units for the returned value are determined by the current position mode.

Position Mode Returned Value
FrameMode Frame number
TenthsSecondsMode Hundredths of seconds

To set the position mode, call IMSVidPlayback::put_PositionMode.

Return Values

The method returns an HRESULT. Possible values include the following.

Value Description
E_NOINTERFACE The source does not support getting the length.
E_POINTER NULL pointer argument.
ERROR_INVALID_STATE The graph is not built. Call the Build or View method on the Video Control.
S_OK The method succeeded.
  • Note   The value ERROR_INVALID_STATE is converted to an HRESULT with the HRESULT_FROM_WIN32 macro.

Remarks

Call the IMSVidCtl::Build or IMSVidCtl::View method before calling this method.

Requirements

  Header: Dshow.h.

  Library: Quartz.dll.

See Also