Winamp Status info

Here's a small class I once wrote in order to be able to get winamp info status. You can use this in conjunction with curl to post the status of your winamp to your blog or personal site whenever it changes. The functionality is rather limited but it was enough for my needs.

How to use :

// instantiate a WinampInfo object when your program starts
// when your application starts

WinampInfo wInfo;

// whenever you want to check for new status
// call the Refresh method then check if status
// changed, if so, do whatever you want.

wInfo.Refresh();
if ( wInfo.StatusChanged() )
{
WinampStatus &currentStatus = wInfo.GetInfo();
printf( "status [%s]. song nr [%d], name [%s]\n",
currentStatus.GetStatusName(),
currentStatus.m_SongNumber,
currentStatus.m_SongName );
}
Click here to get the source code.