DLL to change WMP visulizations on the fly.

Just starting out? Need help? Post your questions and find answers here.
TimeSurfer
User
User
Posts: 22
Joined: Wed Jan 23, 2008 6:58 am

DLL to change WMP visulizations on the fly.

Post by TimeSurfer »

I was wondering if anyone could point me in the right direction or give me some info on how to change the visualizations in windows media player on the fly. i know i can change them in the registry but the changes dont take effect till the next run wmp is ran or its ocx. ams uses the wmp ocx to create a wmp object plugin. i need to make a dll that can change the visualizations instantly like you can in windows media player itself.

if you have any questions as to what type of info i need id be happy to answer as i have been scowering for info to no avail
thorax
New User
New User
Posts: 3
Joined: Mon Jan 14, 2008 12:21 pm

Re: DLL to change WMP visulizations on the fly.

Post by thorax »

TimeSurfer wrote:I was wondering if anyone could point me in the right direction or give me some info on how to change the visualizations in windows media player on the fly. i know i can change them in the registry but the changes dont take effect till the next run wmp is ran or its ocx. ams uses the wmp ocx to create a wmp object plugin. i need to make a dll that can change the visualizations instantly like you can in windows media player itself.

if you have any questions as to what type of info i need id be happy to answer as i have been scowering for info to no avail
As i know, <b>all</b> components from wmp (exept the exe itsself) are com-objects. You can try to send wmp a message to change the visualizations. The follow example is for play, pause and stop wmp. I don't know the right constants for change the visualizations.

Code: Select all

#APPCOMMAND_MEDIA_STOP       = $d0000
#APPCOMMAND_MEDIA_PLAY_PAUSE = $e0000
#APPCOMMAND_MEDIA_PLAY       = $2e0000
#APPCOMMAND_MEDIA_PAUSE      = $2f0000

myHandle = FindWindow_("WMPlayerApp", "Windows Media Player")

If myHandle <> 0

  SendMessage_(myHandle, #WM_APPCOMMAND, 0, #APPCOMMAND_MEDIA_PLAY)
 
  Delay(10000)
 
  SendMessage_(myHandle, #WM_APPCOMMAND, 0, #APPCOMMAND_MEDIA_STOP)

EndIf
TimeSurfer
User
User
Posts: 22
Joined: Wed Jan 23, 2008 6:58 am

Post by TimeSurfer »

thanks thorax this at least gives me some basis to go on. thanks much
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

You could dig out the interfaces, create the objects, and then build your .dll that way too. Its not so hard to do once you get the interfaces defined correctly. But...that might be a little too much for what you want to do so the send message thing as suggested above might suit your needs a little better.
TimeSurfer
User
User
Posts: 22
Joined: Wed Jan 23, 2008 6:58 am

Post by TimeSurfer »

well i downloaded the sdk for wmp10 last night and have been going through it although alot of it is hard to understand cause im not a c coder but i have found the IWMPEFFECTS and IWMPEFFECTS2 are the 2 interfaces that control visualizations but more over what i was looking at in the sdk was the effects.nexteffect and effect.previouseffect as they allow you to switch the effect and as long as you set effects.allowall to true the enduser can cycle through all the effects installed on their system

i just cant figure out how i would implement this in pb. also i believe the visualizations are com objects as is the dll that controls them but i suk at com lol
TimeSurfer
User
User
Posts: 22
Joined: Wed Jan 23, 2008 6:58 am

Post by TimeSurfer »

can anyone give me any insight on how to port those over to pb so i can use them. I'm not wanting anyone to do it for me, but some help would be greatly appreciated as i have no idea where to start. So far all i have determined is which interfaces i need to use. I just dont know how to use them lol.
eriansa
Enthusiast
Enthusiast
Posts: 277
Joined: Wed Mar 17, 2004 12:31 am
Contact:

Post by eriansa »

It looks like those interfaces are not public.
(i've tried it in VB, but no luck)
Post Reply