Windows Media Format SDK banner art
PreviousNext

IMDSPObjectInfo::GetLongestPlayPosition

The GetLongestPlayPosition method retrieves the longest play position of the object. The object must be a music file on the media device.

Syntax

HRESULT GetLongestPlayPosition(
  DWORD*  pdwLongestPos
);

Parameters

  pdwLongestPos

[out]  Pointer to a double word containing the longest play position of the object, in milliseconds.

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 is not a valid playable file.
WMDM_E_NOTSUPPORTED This object cannot report longest play position.
E_FAIL An unspecified error occurred.

Remarks

The object must be an audio data file. For all other object types, this function returns E_INVALIDTYPE.

The value returned in pdwLongestPos is specified in milliseconds. The last play position changes when either the user presses Play on the media device, or when an application invokes the IMDSPDeviceControl::Play method and that play exceeds the position of the last longest play position.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.