ActiveX VLC DLL does not work!

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
Videogamer555
Blank Cone
Blank Cone
Posts: 66
Joined: 07 Feb 2012 01:14

ActiveX VLC DLL does not work!

Postby Videogamer555 » 17 Oct 2014 08:26

My system is Win7 x64. My software that I'm trying to use the VLC plugin in is a program that I'm writing in VB6 (which obviously only has an x86 version, as it came out way before x64 computers). So I am using the x86 version of VLC player. Not sure if this is a problem or not, but if it is, I hope there is a workaround, as I want to get the plugin working in my VB6 program. Well I have tried to reinstall VLC player multiple times. I have used the command prompt, in administrator (elevated permissions) mode, to register, then unregister, then register again, this plugin. And every time I try to add the ActiveX control to the list of available controlls in VB6 (via the components menu), I keep getting this same error:
'C:\Program Files (x86)\VideoLAN\VLC\axvlc.dll' could not be loaded.
Please tell me how to fix this error, or if that's not possible, have the developers release a version that will not produce this error.

nfoto
New Cone
New Cone
Posts: 2
Joined: 15 Nov 2014 01:38

Re: ActiveX VLC DLL does not work!

Postby nfoto » 15 Nov 2014 02:01

Your approach does not work with v2 of axvlc.dll.

Instead, use dynamic addition of the dll at run-time (through the VBControlextender interface) and access the properties from the .object property.

For example, like this in a FORM_LOAD (VB6):

Code: Select all

Dim m_axVLC As VBControlExtender set m_axVLC=Controls.Add(<location of axvlc.dll>, "m_axVLC") With m_axVLC.object .toolbar=True .playlist.Stop .playlist.Items.Clear .playlist.items.add <file> .playlist.play 'etc. etc. end with ' control properties such as .height, .width, etc. can be set directly like this (no .object reference required) m_axvlc.top = <number> ' this is how you size the playing window of the control because it is only added at runtime.
At the end, don't forget

Code: Select all

set m_axvlc=nothing
Do not add axvlc.dll to the component list of the project (registration will fail as you already have discovered).
Instead, run
regsvr32 - u axvlc.dll
In the 32-bit folder for program files. Don't forget to re-register the dll every time you update VLC.

I'm currently running large VB6 projects incorporating VLC in this manner under 32- and 64-bit versions of Windows 7, Vista, XP, 2003 Server, and 2008 Server. No problems whatsoever.

The v2 of this dll is much more stable than the early ones that caused a lot of crashes and instabilities. Don't use any version earlier than VLC 2.08.

Hope this helps.

nfoto
New Cone
New Cone
Posts: 2
Joined: 15 Nov 2014 01:38

Re: ActiveX VLC DLL does not work!

Postby nfoto » 17 Nov 2014 13:29

I misread my notes. Sorry.

In the post above, replace the statement

set m_axVLC=Controls.Add(<location of axvlc.dll>, "m_axVLC")

with

set m_axVLC=Controls.Add("VideoLAN.VLCPlugin.2", "m_axVLC")

You still need to have axvlc.dll registered using regsvr32.exe. Tested with the latest nightly build (VLC 2.20) and is OK.

Videogamer555
Blank Cone
Blank Cone
Posts: 66
Joined: 07 Feb 2012 01:14

Re: ActiveX VLC DLL does not work!

Postby Videogamer555 » 25 Oct 2015 11:17

I misread my notes. Sorry.

In the post above, replace the statement

set m_axVLC=Controls.Add(<location of axvlc.dll>, "m_axVLC")

with

set m_axVLC=Controls.Add("VideoLAN.VLCPlugin.2", "m_axVLC")

You still need to have axvlc.dll registered using regsvr32.exe. Tested with the latest nightly build (VLC 2.20) and is OK.

What are the properties and methods I can use? Is there full documentation on this DLL file?

Videogamer555
Blank Cone
Blank Cone
Posts: 66
Joined: 07 Feb 2012 01:14

Re: ActiveX VLC DLL does not work!

Postby Videogamer555 » 25 Oct 2015 21:40

Your approach does not work with v2 of axvlc.dll.

Instead, use dynamic addition of the dll at run-time (through the VBControlextender interface) and access the properties from the .object property.

For example, like this in a FORM_LOAD (VB6):

Code: Select all

Dim m_axVLC As VBControlExtender set m_axVLC=Controls.Add("VideoLAN.VLCPlugin.2", "m_axVLC") With m_axVLC.object .toolbar=True .playlist.Stop .playlist.Items.Clear .playlist.items.add <file> .playlist.play 'etc. etc. end with
Doesn't appear you actually tested your code before recommending it.
Playlist.items.add does NOT work. It gives me the error "Object doesn't support this property or method".


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 4 guests