|
|
#1 |
|
Junior Member
|
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 |
|
|
|
|
|
#2 |
|
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 |
|
|
|
|
|
#3 |
|
Senior Member
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
|
|
|
|
|
|
#4 |
|
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 |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|