IMDSPObjectInfo::GetPlayOffset
The GetPlayOffset method retrieves the play offset of the object, in units pertinent to the object. This is the starting point for the next invocation of IMDSPDeviceControl::Play.
Syntax
HRESULT GetPlayOffset(DWORD*pdwOffset);
Parameters
pdwOffset
[out] Pointer to a DWORD containing the play offset 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 the play offset. |
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 retrieved is either zero (if the SetPlayOffset method has not been called) or the value set by SetPlayOffset clipped to be no greater than the total play length of the object minus one unit.
For playable files, the value returned is specified in milliseconds. The play offset value does not change when the user starts playing a file on the media device or when an application invokes the IMDSPDeviceControl::Play method.
For folders or file systems containing playable files, the value returned indicates the first track that is played when an application invokes the IMDSPDeviceControl::Play method.
Requirements
Header: Defined in mswmdm.h.
Library: mssachlp.lib
See Also