The IDirectMusicSegment::Clone method creates a copy of the segment and all the tracks it contains.
HRESULT Clone(
MUSIC_TIME mtStart,
MUSIC_TIME mtEnd,
IDirectMusicSegment** ppSegment
);
If the method succeeds, the return value is S_OK, or S_FALSE if some tracks failed to clone.
If it fails, the method may return one of the following error values:
E_OUTOFMEMORY |
E_POINTER |
If an IDirectMusicGraph exists in the segment, a copy of the pointer is included in the clone and the reference count is incremented. The start point and loop points set by the IDirectMusicSegment::SetStartPoint and IDirectMusicSegment::SetLoopPoints methods are set to their default values (0, and 0 to the end of the segment respectively) inside the clone. The number of repeats is reset to 0. The resolution set by the IDirectMusicSegment::SetDefaultResolution method is copied into the clone.
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.