Friday, August 10, 2007

Controlling Winamp programmatically using Delphi

I wanted in one of my project to control Winamp from application written in Delphi. It is well-known that Winamp can be controlled programmatically by finding the Winamp's window. It can be done performing the following Win32 API call:

hwnd_winamp := FindWindow('Winamp v1.x', nil);

Winamp window's class is always Winamp v1.x regardless its actual version. Once you have the handle to winamp's window you can controll it by sending to it certain messages which are specified in Winamp's SDK. However, the SDK on Winamp's website is available only for C++ developers. By googling over the Internet I have come across the translation of those header file to pascal done by Carlos Andres Osorio Gonzalez. However, it is based on the antique version of SDK and is lacking new features. I've decided to extend it, translating the lacking entries from the latest version of C++ SDK.
What I've come up with can be downloaded here or can be viewed here in browser by clicking here.

Enjoy it, but I cannot guarantee that it is free of errors.

3 comments:

Thule said...

Hi There :)

Great to see other ppl have searching for this. I will try it like, hmmm, the 24st amp-ctrl i tested.

Thank You

Best regards, Thule

Thule said...

Hi There :)

Great to see other ppl have searching for this. I will try it like, hmmm, the 24st amp-ctrl i tested.

Thank You

Best regards, Thule

Kofi said...

Hi,

I just wanted to say that I really enjoyed your blog and this post. You make some very informative points. Keep up the great work!

-
Delphi development

There were visits to this blog since 20.08.2007.