Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 27th April 2002, 21:34   #1
ncoad
Junior Member
 
Join Date: Apr 2002
Posts: 1
Send a message via AIM to ncoad
C# External Control Class

How'dy!

I have developed an external (from WinAmp) C# wrapper class to control WinAmp functions (such as play, pause, stop, etc). It is simular to the VB code written by Duane Odom at:
http://www.winamp.com/nsdn/vault/WinAMP_VB.jhtml

Who should I contact at NullSoft to give them the code to be posted in their code vault?

Thanks,
-Noah Coad
Attached Files
File Type: zip winamp.zip (13.6 KB, 339 views)
ncoad is offline   Reply With Quote
Old 6th July 2002, 23:25   #2
barney911
Junior Member
 
Join Date: Jul 2002
Posts: 10
c# wrapper class

hi noah,

i found your wrapper class and tried it out. it works great, there's just thing, i'm really missing and maybe you can figure out how to solve it.

i'm going to write some sort of discjockey application with c# and won't come round to using 2 winamps at the same time. the problem now is, that after creating the second WinAmp object, the window handle to the first instance is gone and pointing at the new created window as well.

it would be great, if you could offer me some advice.

greets,
barney
barney911 is offline   Reply With Quote
Old 12th July 2002, 00:27   #3
Gourou
Senior Member
 
Gourou's Avatar
 
Join Date: Feb 2002
Location: The backside of the universe on the trailing edge of eternity
Posts: 238
instantiate the second winamp instance with a different classname, then keep track of which is which inside of the program
Gourou is offline   Reply With Quote
Old 12th July 2002, 05:28   #4
barney911
Junior Member
 
Join Date: Jul 2002
Posts: 10
How to manage using different class names?

As I am no "original" C/C++ programmer, I don't know much about Windows programming.

What I did now was the following:
- Use System.Diagonstics.Process objects for all created instances:
So I can get all the handles to the Winamp instances that I use and
close them again afterwards.

- When trying to find the playlist window, that is attached to each
of the Winamps, I browse the window list using the API call
FindWindowEx (...) with certain parameters.

It took me ages and some help from a friend to make this thing work.

- Then I compare the playlist's owner with my Winamp window to find
the matching instances.

Actually it wouldn't be that difficult as I suppose to know now and you idea with using different class names sounds helpful as well, but
my code works fine now

Maybe you've got some code snippets that show, how to work with this ClassRegister (..) (??) stuff in C#. I don't have a clue yet.

As soon as I have the C# code above in a way that doesn't embarrass me to post it in the forum, you'll get notice to have a look at the source code. Maybe somebody else needs some type of library like this.

Tschau,
Gerhard
barney911 is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump