Has anyone ever tried to implement an ActiveXComponent into Win VST Plugin? Such as adding QuickTime or FlashPlayer activeX component into juce VST plugin?
I am doing this research right now. Neither QT activeX and FlashPlayer activeX component will display, they actually wasn’t created at all. Is there anything missing?
I wouldn’t really recommend this - hosts can be a bit funny about what goes on in their windows. But having said that, I’d be interested to know what’s not working, if you manage to debug it.
The flashPlayerComponent is really similar to juce_QuickTimeMovieComponent, except specific funtions provided by FlDbg9.ocx.
I copied the EditorCompWrapper from “juce_VstWrapper.cpp” to make a wrapper for the flashPlayerComponent. Instead of choosing file name by adding a file browser, I did dirty and quick way by just hard coding the file path.
In “juce_VSTWrapper::dispatcher”, I replaced the deleteEditor() and createEditor() with the flashcomponentwrapper and call playFlash() right after the object is created.
Object was created successfully. The problem is in flashPlayerComponet::createControlIfNeeded(), “Component::isShowing()” always returns 0, as while the parentComponent_ == 0, getPeer() failed.
If I removed if (isShowing() && ! isControlCreated()) from
createControlifNeeded, in ActiveXControlComponent::createControl(const void* constrolIID), line Component* const peer = getPeer(); failed.
If ActiveXComponent is not a good way to implement existing activeXcontrol into a VST plugin, is there any other way it would work? The problem basically is how to embed a activeX control into Juce dialog as in dll.
After I posted the first result, I did another test by calling playFlash() on juce_VstWrapper::dispatcher at
if( opCode == effEditGetRect)
It gives the system enough time to create the window and its components.
This time, it moved forward to ActiveXControlComponent::createControl(const void* controlIID)
Succeed in getPeer, failed at OleCreate(), error message is “Class not registered”
I registered all classes I need and it still gives me the same error.
It is exciting it at least moves forward a bit. Can anyone give me some suggestions on this error?
Looks like there is no one every tested this. I just updated what I’ve done lately.
I did notice at QuickTimeMovieComponent::createControlIfNeeded(), calling ActiveXControlComponent::createControl(), The Rect for IOleObject::DoVerb is a 0 point. The parent window does have rect area. I haven’t figured out why.
After maually change the Rect, the quicktime component is supposed to play movie. Finally, I get the helpless error dialog saying “Quicktime doesn’t support the display setting, restart your application and try again”. That is about how far it goes now.
The problem I have now is that I was unable to change the audio plugin window size. Looking forward to any solution about this problem.
Finally, I found the problem call quicktime component directly won’t give it the correnct rectangle to display, it only plays sound.
So I added it into the big component wrapper with other editor. Now it works. It play the sound and the movie. Rectangle size may need be re-adjusted. But it works.
I took back what I said about activeX won’t work with dll. It just needs extra work.