DirectX SDK

IDirectMusicTrack::Clone

The IDirectMusicTrack::Clone method makes a copy of a track.

HRESULT Clone(
  MUSIC_TIME mtStart,
  MUSIC_TIME mtEnd,
  IDirectMusicTrack** ppTrack
 );

Parameters

mtStart
Start of the part to clone. It should be 0 or greater and less than the length of the track.
mtEnd
End of the part to clone. It should be greater than mtStart and less than the length of the track.
ppTrack
Address of a variable to receive a pointer to the created track, if successful.

Return Values

If the method succeeds, the return value is S_OK.

If it fails, the method can return one of the following error values:

E_FAIL
E_INVALIDARG
E_OUTOFMEMORY
E_POINTER

Remarks

It is the caller's responsibility to call Release when finished with the track.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dmusici.h.