Open wa_ipc.h (it should be in the Winamp SDK), and you'll find all (?) messages there, with enough documentation to get you started.
The "events" are sent as WM_WA_IPC windows messages, with the event identifier as lParam, and additional information in the wParam. Besides the IPC_PLAYING_FILE/IPC_PLAYING_FILEW messages, which are sent when the playback is started, there are other callbacks, just search for 'IPC_CB_', they should be in one place. There are others too, just look around, but I doubt you'll find one for song ending. You can do that by Getting the current song length, and current position in the song, and compare them