• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

winamp grabbing

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

glebka11

Member
Joined
Oct 12, 2003
Location
Canada
Hey guys,
Sorry if my question sounds stupid, but do someone know how to grab winamp info?
I wana make an app for grabbing info from winamp player.
can someone help me plz?

EDIT:

well, i found something nd tryed to use it but it just not works...


Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_USER = &H400
Private Const IPC_GETLISTPOS = 125
Private Sub Command1_Click()
Dim hwndWinamp As Long
Dim res
hwndWinamp = FindWindow("Winamp v1.x", vbNullString)
res = SendMessage(hwnd_winamp, WM_USER, 0, IPC_GETLISTPOS)
MsgBox res
End Sub
 
Last edited:
OP
glebka11

glebka11

Member
Joined
Oct 12, 2003
Location
Canada
Well i guess IPC_GETLISTPOS means i wana get the number of song playing :)
the problem it doesnt work :'(
i tryed to get the duration of the song - the same problem. :(
 

Antillian

Member
Joined
Nov 24, 2003
Location
Atlanta, GA
i see, i guess i thought that "IPC_GETLISTPOS" meant you were trying to get the "position" or current song that was playing. sry though, not exactly sure what the problem is.
 
OP
glebka11

glebka11

Member
Joined
Oct 12, 2003
Location
Canada
The problem is that it allways returns 1 , on whatever i wana get...
 
Last edited:

Damian

Member
Joined
Mar 4, 2003
Location
Acton, MA
Do you get the handle in the first place? Maybe your problem is that you're searching for a window called "Winamp v1.x"?