Page 1 of 1

Can't add VLC plugin to VB.net

Posted: 29 Dec 2015 09:33
by jcvamp
I tried adding the VLC control to a vb.net project, but it says axvlc.dll isn't registered. I tried registering it with Regsvr32.exe, and it said it worked, but I still can't add it to my vb.net project.

Re: Can't add VLC plugin to VB.net

Posted: 29 Dec 2015 20:14
by da2424
Do you use the right platform? If you want to create a 32bit executable, you will need VLC 32bit.

Re: Can't add VLC plugin to VB.net

Posted: 30 Dec 2015 23:48
by jcvamp
I want the program to function in both 32 and 64 bit environments. Is there a Regsvr64.exe?

Re: Can't add VLC plugin to VB.net

Posted: 31 Dec 2015 14:24
by da2424
Then, VLC 32bit and VLC 64bit must be installed/registered at the same time.

You can use regsvr32.exe for both.

Re: Can't add VLC plugin to VB.net

Posted: 12 Jan 2016 20:12
by jcvamp
VLC 32-bit is installed. I don't know where to get VLC 64-bit.

Re: Can't add VLC plugin to VB.net

Posted: 12 Jan 2016 22:09
by da2424
You can download it here:
http://get.videolan.org/vlc/2.2.1/win64 ... -win64.exe
But caution, the latest installed VLC platform (in this case the 64bits version) will be the main installation, because the installer will overwrite the file associations, desktop icons and start menu icons of the already installed VLC.

Re: Can't add VLC plugin to VB.net

Posted: 15 Jan 2016 04:30
by jcvamp
Thanks.

Re: Can't add VLC plugin to VB.net

Posted: 25 Jan 2016 16:23
by jcvamp
I installed the newest version, but it didn't make a difference.

Re: Can't add VLC plugin to VB.net

Posted: 29 Jan 2016 15:49
by da2424
Have you installed 32bit and 64bit at the same time?

Re: Can't add VLC plugin to VB.net

Posted: 29 Jan 2016 20:03
by jcvamp
Have you installed 32bit and 64bit at the same time?
I tried one at a time and both together. Neither worked.

Re: Can't add VLC plugin to VB.net

Posted: 01 Feb 2016 22:01
by da2424
Try to install 64bit VLC first and after that 32bit VLC (without uninstalling 64bit VLC), because the dll registration have currently a problem, if 64bit VLC will be installed after 32bit.

Re: Can't add VLC plugin to VB.net

Posted: 02 Feb 2016 22:43
by da2424
I have re-tested it and can confirm now your problem.
I also can't add the 64Bit plugin to Visual Studio, it doesn't appear in the list. And if I want to add it manually, it says "Error during self-registration".

I have created a trac ticket for this problem. (https://trac.videolan.org/vlc/ticket/16547)

As workaround, you can compile as x86, which will run on 32Bit and 64Bit systems, if VLC 32Bit is installed.

Re: Can't add VLC plugin to VB.net

Posted: 11 Feb 2016 08:25
by da2424
Ok, I think I know now the cause.

This behavior is by design. Visual Studio is a 32bit process, and therefore it can only load and execute 32bit modules.

Only if the 32bit module is available, it can also access to 64bit modules (Debugging in "AnyCPU" mode or compiling in "x64" mode).

So the 32bit module must be installed, too. Add the 32bits VLC to your project, and switch to "AnyCPU" or "x64". The 64bits plugin will be used automatically at this point.
(After compiling in "x64" mode, you should switch back to "x86" or "AnyCPU", because the forms designer will have problems after you reopen the project in "x64" mode.

Re: Can't add VLC plugin to VB.net

Posted: 04 Apr 2016 10:04
by jcvamp
It's now giving me another error: "Failed to create component 'AxHost'. The error message follows: 'System.Runtime.InteropServices.COMException (0x8004D73F): This is not a COM component."

Re: Can't add VLC plugin to VB.net

Posted: 04 Apr 2016 14:29
by da2424
Do you open the project in x86 compiler mode? If not, change the mode to x86 and reopen the project.
Visual Studio is really tricky if you also use 64Bit plugins... :(