Author |
Message |
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Sun Aug 31, 2008 12:46 pm Post subject: .dll to relate my c# program with winamp possible? |
|
|
|
|
I was wondering if it was possible to create a winamp plugin that transfers data so to speak between a c# program and winamp. The purpose of this is that when my c# game recording program game timer stops, i would like winamp to select a random song and play it during that stoppage of play, and then stop playing when play resumes. I have already created a basic winamp plugin and the c# program. Is this possible? What is it called. I would google but i have no leads or words to use.
Thank you.
-tcsoccerman |
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Mon Sep 01, 2008 4:35 pm Post subject: |
|
|
|
|
You need to send a Window Message to the winamp application, that will make it do a command (like 'next')
check for SendMessage or PostMessage APIs... you should find something for that, especially for winamp, these things are pretty common. _________________ (Insert a bunch of dead links here) |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Mon Sep 01, 2008 5:58 pm Post subject: |
|
|
|
|
Yes winamp has an sdk, but it's in c... |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Mon Sep 01, 2008 8:27 pm Post subject: |
|
|
|
|
ok i got it to work
i had to use System.Diagnostic.Process.GetProcessByName("winamp")
some other const and stuff and extern static SendMessage()
the only minor problem is that if you start and stop the timer to quick, the messages don't get sent. it is on winamp's side, because i have a messagebox show whenever i call the SendMessages, and it shows always. That's ok, i'm still happy, but any ideas? |
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Mon Sep 01, 2008 11:17 pm Post subject: |
|
|
|
|
check PostMessage... either SendMessage or PostMessage will wait for the message to have been processed before continuing execution... Not sure which one it is
But what would 'too quick' be? every second? You surely can't throw 100 messages per second at winamp and expect it to treat them all But other than that, it should work. |
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Tue Sep 02, 2008 12:08 pm Post subject: |
|
|
|
|
no no no, somewhere around every 2 seconds. basically, you click stop, it will play(music plays when timer is stopped(stoppage of play)), then two seconds later you click play(music stops) and the message sent to stop the music will not be recgonized.
I'm using SendMessage(). |
|
Back to top |
|
|
JoWie Server Help Squatter
Gender: Joined: Feb 25 2004 Posts: 215 Offline
|
|
Back to top |
|
|
tcsoccerman Server Help Squatter
Age:31 Gender: Joined: Jan 15 2007 Posts: 694 Location: Atlantis Offline
|
Posted: Wed Sep 03, 2008 7:32 pm Post subject: |
|
|
|
|
Hey, that's cool. I did in fact solve my problem but thank you anyways. |
|
Back to top |
|
|
|