IMDSPObjectInfo::SetPlayOffset method (mswmdm.h)

The SetPlayOffset method sets the play offset of the object, in the units pertinent to the object. This specifies the starting point for the next invocation of IMDSPDeviceControl::Play.

Syntax

HRESULT SetPlayOffset(
  [in] DWORD dwOffset
);

Parameters

[in] dwOffset

DWORD containing the play offset to set for the object, in units pertinent to the object.

Return value

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 extensive list of possible error codes, see Error Codes.

Remarks

If the value passed is greater than the total length of the object minus the current play length, it is clipped to the length of the object minus the play length.

For playable files, the value is specified in milliseconds. The play offset position 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 indicates the first track that is played when an application invokes the IMDSPDeviceControl::Play method.

Requirements

Requirement Value
Target Platform Windows
Header mswmdm.h
Library Mssachlp.lib

See also

IMDSPObjectInfo Interface

IMDSPObjectInfo::GetPlayOffset