Page 1 of 1

Can't use functions like addTarget from the ActiveX in VC++

Posted: 30 Jan 2007 11:14
by mathieu44
I have registered the VLC activeX using "regsvr32 axvlc.dll".
In my Visual Studio 2005 project, I have created a ActiveX control using the VLC ActiveX.

First can someone explain me why the ActiveX registration (by regsvr32) created two ActiveX controls : "VideoLAN VLC ActiveX Plugin v1" and "VideoLAN VLC ActiveX Plugin v2" ? I have read on [url]viewtopic.php?p=92883&sid=497dd2bc0ebf3 ... c5a69cbe20[/url] that it is not a problem and that using v1 or v2 is just the same.

Then I wanted to test my ActiveX control. But I can't use function llike addTarget(...). It seems the only functions that I can use begin with "put_" or "get_" (like put_Volume or get_Volume). Visual Studio doesn't propose me other functions (in the functions choice pop-up window) that these latter and when I try to force the use of another function like addTarget, my project doesn't compile.

Can someone explain me how he/she gets access to a function like addTarget ?

Finally, I have another questions: is there a way to get access to the decoded frames in memory ?

Posted: 30 Jan 2007 17:19
by mathieu44
I want to precise that I use VC++ with MFC under Visual Studio 2005

Posted: 08 Feb 2007 03:05
by cioris
using the class view pannel add a new MFC class from activeX. Select the VideoLan VLC Plugin. Automatically a wrapper class is generated for the activeX interface. YOu will find the addTarget in the list. Declaring an object of that type you will be able to have access to all functions

Can't use functions like addTarget from the ActiveX in VC++

Posted: 12 Feb 2007 18:22
by mathieu44
That's what I did but I tried that on several machines and on some of them, I couldn't access all the functions (for example, I couldn't access addTarget).

I think that unregistering axvlc.dll and registering it again (using regsvr32) should fix that. I'll try.

Posted: 13 Feb 2007 19:42
by cioris
Do you have a compile error or a runtime error?
What do you mean by "couldn't access"?

Can't use functions like addTarget from the ActiveX in VC++

Posted: 14 Feb 2007 23:24
by mathieu44
What I mean is that I can't compile. The addTarget function, for example, isn't available in the popup menu that appears when I type the dot (.) after my variable name (this popup menu contains all the available functions).

I have found the reason for that: the VLC plugin seems to be available in 2 versions (v1 and v2). On my machine, the control based on v1 doesn't contain addTarget whereas the control based on v2 contains addTarget.

Therefore, I use v2 now.

Now I have a problem : I don't know how to grab a frame. But this is another problem ... (if anyone has a suggestion, I'd be glad to hear it)