PDA

View Full Version : Retrieve filename of winamp....


ulunn
14th April 2006, 09:47
hi all

first, sorry for my english because i speak french ....


i try to get the filename of the song is playing in winamp ... i try to get this in my software (delphi7)

i have read this on sdk but winamp return nothing

const IPC_INFOBOX = 293; WM_WA_IPC = WM_USER;
var a:tinfoboxparam;
...
wmp := FindWindow('Winamp v1.x', nil)
SendMessage(wmp,WM_WA_IPC,WPARAM(@a),IPC_INFOBOX);

showmessage(pchar(a.filename));



thanks for your help

chengzw
14th April 2006, 10:14
hi ulunn, use this:
char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTFILE);

ulunn
14th April 2006, 10:21
re, thx for you help but

sendmessage reply integer and not a char
and what is the value of index ?

i use delphi7 ....

DrO
14th April 2006, 12:45
you're trying to use messages that are only intended for inprocess use ie from a loaded plugin and hence is why most of that isn't working. to use such apis you'd need to inject into the winamp process space (this shows how (http://forums.winamp.com/showthread.php?s=&threadid=174039&highlight=winampmagic) but it's in C but should be relatively easily to get something working in delphi though)

-daz

ulunn
14th April 2006, 12:57
BIG BIG BIG THANKS :D