BASS_MusicGetLength

Retrieves the length (in orders) of a MOD music.

DWORD WINAPI BASS_MusicGetLength(
    HMUSIC handle
);

Parameters
handleThe MOD music's handle.

Return value
If succesful, then the music's length is returned, else 0xFFFFFFFF is returned. Use BASS_ErrorGetCode to get the error code.

Error codes
BASS_ERROR_HANDLEhandle is not valid.

Example
To start playback of a MOD music from the beginning of the last order.

DWORD len=BASS_MusicGetLength(a_music); // get length
BASS_MusicPlayEx(a_music,MAKELONG(len-1,0),-1,TRUE); // play

See also
BASS_ChannelSetPosition, BASS_MusicPlayEx