Add songs at winamp

How can I add a mp3 from a delphi program in the winamp3-list.

I use this code to play the first song:
ShellExecute(Handle, 'open',PChar(song),nil,nil,SW_SHOWNORMAL);

When I add the next song, it has to take place in the queue of winamp. Now, the first song stops playing and the second begins.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

There are a couple ways.  

First, you can use the above method.  To find out how Winamp queue's files you need to open up the "File Types" dialog (View Menu -> Folder Options -> File Types while in Windows Explorer) and find the entry for .MP3.  When you find it, check to see what commandline parameters are used for the Enque action.  The drawback here is you'll need to know the full path\filename of the winamp.exe file, you wont just be able to specify the mp3 file in the shellexecute() command.

Second (and the method I would probably use) would be to use the Winamp API.  It's documented quite well on the winamp webpage.  If you dont understand it, you can probably find a wrapper component that handles all the tough work at

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
misterstefanoAuthor Commented:
I used the first methode, this works.
For the 2th methode, you have to download a new component for delphi?
No you dont have to download a component for the second method.  It would just be a lot easier than reading their documentation and writing your own implementation.

The docs for Winamp 2 can be found at
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.