Share via


IWMDMObjectInfo::GetLastPlayPosition

banner art

The GetLastPlayPosition method retrieves the last play position of the object. The object must be an audio file on the media device.

Syntax

HRESULT GetLastPlayPosition(DWORD*pdwLastPos);

Parameters

pdwLastPos

[out]  Pointer to a DWORD specifying the last play position of the object, in milliseconds.

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 last play position.
E_INVALIDTYPE The object is not a valid playable file.
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 last play position changes when either the user starts playing a file on the media device or when an application invokes the IWMDMDeviceControl::Play method.

Requirements

Header: Defined in mswmdm.h.

Library: mssachlp.lib

See Also