views:

50

answers:

1

Hi!

I want to use the systems available windows media player visualizers in my app. Apperently visualizers expose an IWMPEffects interface to the world. My question is how do I enumerate and create instances to the available visualizers on my system? Probably it's just a process of getting the cslid of the visualizers and then create the instance with CoCreateInstance. However I have no idea how to get these clsid's!

Thanks!

+1  A: 

The CLSIDs of the objects that implement IWMPEffects are stored as subkeys of HKLM\SOFTWARE\Microsoft\MediaPlayer\Objects\Effects.

Lorenzo
I think you're on the right track, the info is definitely in the registry. However I only found one reference to visualizer and that's the "Viz plugin". I think this plugin looks up the installed visualizers in another place.I have installed a viz which resides in "Pulsing.dll". A quick search for it in regedit gets me the clsid, but I have not been able to trace where this clsid comes from! Maybe use some tool to see what windows media player are pulling from the registry at startup?
monoceres
Mmm the CLSID of the various visualizer have to be somewhere in the registry, otherwise WMP should enumerate the entire HKEY_CLASSES_ROOT\CLSID, and that's not viable! However the key I provided in the answer was the most logical place...If I remember correctly, also Windows Media Center uses the same visualizations, and as it is a .net application, you could check with Reflector ;)
Lorenzo
I got it! Used process monitor from sysinternals to monitor what keys wmp read, searched for my known clsid and bang! Found that the visualizers are stored in HKLM\SOFTWARE\Microsoft\MediaPlayer\Objects\EffectsIf you edit your post to reflect this revelation I'm tagging it as the solution ;)
monoceres
Well done! Of course the answer seems so logical when you've discovered it! I edited the answer to reflect the correct registry key.
Lorenzo