IMDSPObjectInfo::GetTotalLength

banner art

The GetTotalLength method retrieves the total play length of the object in units pertinent to the object. The value returned is the total length regardless of the current settings of the play length and offset.

Syntax

HRESULT GetTotalLength(DWORD*pdwLength);

Parameters

pdwLength

[out]  Pointer to a DWORD containing the total length of the object, in units pertinent to the object.

Return Values

The method returns an HRESULT. All the interface methods in Windows Media Device Manager can return any of the following classes of error codes:

  • Standard COM error codes
  • Windows error codes converted to HRESULT values
  • Windows Media Device Manager error codes

For an extenstive list of possible error codes, see Error Codes.

Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.
WMDM_E_NOTSUPPORTED This object cannot report total play length.
E_INVALIDTYPE The object that this interface is associated with is not a valid playable file or a folder or file system containing playable files.
E_FAIL An unspecified error occurred.

Remarks

The value returned in the pdwLength parameter is the total length of the object regardless of the current settings of the play length and play offsets.

For playable files, the total length is specified in milliseconds.

For folders or file systems containing playable files, the value returned indicates the total number of playable files in a folder or in the root of a file system.

Requirements

Header: Defined in mswmdm.h.

Library: mssachlp.lib

See Also