Windows Media Format SDK banner art
PreviousNext

IMDSPObjectInfo::SetPlayOffset

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 play.

Syntax

HRESULT SetPlayOffset(
  DWORD  dwOffset
);

Parameters

  dwOffset

[in]  Double word containing the play offset to set for the object, in units pertinent to the object.

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 that this interface is associated with is not a valid playable file or a folder or file system containing playable files.
WMDM_E_NOTSUPPORTED This device does not support setting play lengths.
E_FAIL An unspecified error occurred.

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 presses play 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.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.