Windows Media Format SDK banner art
PreviousNext

IWMDMObjectInfo::SetPlayLength

The SetPlayLength method sets the maximum time, in milliseconds, that an object can be rendered regardless of its actual length.

Syntax

HRESULT SetPlayLength(
  DWORD  dwLength
);

Parameters

  dwLength

[in]  Double word containing the play length to set for the playable 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 with which this interface is associated is not a playable file or folder.
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 object length, dwLength is clipped to the length of the object minus the current play position minus one unit.

The value set for playable files is specified in milliseconds. The value is clipped to the total file length minus the current play offset. The play position can change either when the user presses Play on the media device, or when an application invokes the IWMDMDeviceControl::Play method.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.