View Single Post
Old 11th November 2005, 23:49   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
taken from the modified wa_ipc.h

code:
char* GetExtendedFileInfo(char* file, char* field){
extendedFileInfoStruct exFIS = {0};
static char metadata[256] = {0};
exFIS.filename = file;
exFIS.ret = metadata;
exFIS.retlen = sizeof(metadata);
// "ARTIST", "TITLE", "ALBUM", "TRACK", "YEAR", "GENRE", "COMMENT"
exFIS.metadata = field;
if(SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)
&exFIS,IPC_GET_EXTENDED_FILE_INFO)){
// can do stuff since data was received
return metadata;
}
return 0;
}


that can be used (with 5.x) to query the artist and title as needed. the current song is obtained with char* file = (char*)SendMessage(hwnd_winamp,WM_WA_IPC,SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS),IPC_GETPLAYLISTFILE);

-daz
DrO is offline   Reply With Quote