Microsoft DirectX 8.0 (C++) |
Searches the list of tracks for the one with the supplied type, group, and index, and retrieves a pointer to the DirectMusicTrack object.
HRESULT GetTrack( REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, IDirectMusicTrack** ppTrack );
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the following error values:
DMUS_E_NOT_FOUND |
E_FAIL |
E_POINTER |
To enumerate all tracks, use GUID_NULL for the rguidType and 0xFFFFFFFF for dwGroupBits. Call GetTrack starting with 0 for dwIndex, incrementing dwIndex until the method no longer returns a success code.
Tracks in segments created by DirectMusic Producer are not necessarily in the same order as they were in that application. Do not rely on dwIndex alone to find a particular track.
For more information on track groups, see Identifying the Track.
Header: Declared in dmusici.h.