IDirectMusicTrack::Init

The IDirectMusicTrack::Init method is called by a segment when a track is added and performs any necessary initialization.

HRESULT Init(
  IDirectMusicSegment* pSegment
);
 

Parameters

pSegment
Pointer to the segment to which this track belongs.

Return Values

If the method succeeds, the return value is S_OK.

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

DMUS_E_NOT_INIT
E_OUTOFMEMORY
E_POINTER

Remarks

If the track plays messages, it should call IDirectMusicSegment::SetPChannelsUsed in the Init method.

QuickInfo

  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.