Windows Media Format SDK banner art
PreviousNext

IWMDMObjectInfo::GetPlayOffset

The GetPlayOffset method retrieves the starting point for the next invocation of a Play command.

Syntax

HRESULT GetPlayOffset(
  DWORD*  pdwOffset
);

Parameters

  pdwOffset

[out]  Pointer to a double word containing the offset into a file at which the next Play command can be invoked.

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.
E_FAIL An unspecified error occurred.

Remarks

The pdwOffset parameter is equal to the value assigned by SetPlayOffset, clipped to be no greater than the total play length of the object minus one time unit. If the SetPlayOffset method has not been called, pdwOffset is zero.

For playable files, the value returned is 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 IWMDMDeviceControl::Play method.

For folders or file systems containing playable files, the value returned is in tracks, meaning that pdwOffset indicates the first track to be played when an application invokes the IWMDMDeviceControl::Play method.

See Also

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.