Previous | Next |
The SetPlayLength method sets the play length of the object, in units pertinent to the object. This is the maximum length that the object plays regardless of its actual length.
Syntax
HRESULT SetPlayLength(
DWORD dwLength
);
Parameters
dwLength
[in] Double word containing the play length 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, it is clipped to the length of the object minus the object's current play position minus one unit.
For playable files, the value to set is specified in milliseconds. The value is clipped to no more than the total length of the file minus the object's current play offset position. The play position information can change either 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 passed is the number of playable files in that folder or in the root of that file system.
See Also
Previous | Next |