Windows Media Format SDK banner art
PreviousNext

IWMDMObjectInfo::GetPlayLength

The GetPlayLength method returns the total amount of time or the time remaining during which a playable object can be rendered.

Syntax

HRESULT GetPlayLength(
  DWORD*  pdwLength
);

Parameters

  pdwLength

[out]  Pointer to a double word containing the length of the object in relevant units.

Return Values

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Return code Description
E_INVALIDTYPE The object with which this interface is associated is not a playable file or folder.
E_FAIL An unspecified error occurred.

Remarks

The value of pdwLength is either the total length of the object minus the current play position if the SetPlayLength method has not been called, or the value set by SetPlayLength but clipped to be no greater than the total play length of the object minus the current play position.

The value returned for playable files is specified in milliseconds. The play length can change either when the user presses Play on the media device or when an application invokes the IWMDMDeviceControl::Play method. The value returned for folders or file systems containing playable files is the number of tracks.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.