2
votes

I'm building a Winform application on c# .net 4. I'm trying to use a VLC plugin as a toolbox COM component. The component is successfully added into the toolbox. However, when I use it there is an error:

Failed to create component 'AxHost'. The error message follows: 'System.Runtime.InteropServices.COMException (0x80029C4A):Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A(TYPE_E_CANTLOADLIBRARY)

I tried the same on a 32bit system and it works fine. This error is in a 64 bit system. Tried changing the build to both 32 and 64 bit.

I also tried to register the DLL using regserv32. But I am not sure if i am registering the correct DLL.

How do I solve this?

2
The VLC COM plugin might have been built as a 32bit DLL. Is there any 64bit version of this DLL?PM_ME_YOUR_CODE
There is a 64 bit version of the DLL as well. I will try using that. But when i changed the build version as 32 bit, it did not work.Vinshi
Yes, let's try that and while we are it, can you also try to build your winform application while "ANY CPU" is selected?PM_ME_YOUR_CODE
I downloaded the 64 bit DLL. I try to add the COM component. Now it says "Self Registration of the DLL failed"Vinshi
can we try to unregister the 32bit DLL first (i.e regSvr32 /u DllName.dll) and then register the 64 bit?PM_ME_YOUR_CODE

2 Answers

3
votes

Version 2.x of VLC isn't managed-code-friendly, unless it's recompiled to be shared and run as an executable server(among other issues). Rather than re-build the plugin, just use a slightly older one.

  1. Download V 1.1.9 here: http://download.videolan.org/pub/videolan/vlc/1.1.9/win32/
  2. I recommend uninstalling your existing VLC, then install the above one (with the activeX option).
  3. Register the control (AXVLC.DLL) using CMD and Regsvr32 and the activeX folder, as such: REGSVR32 C:\WINDOWS\AXVLC.DLL

A few tips to remember:

  1. If there is a playback error, you may not have the libraries accessible. They're in the Plugins folder. I believe you can just copy the folder to the activeX folder.
  2. I hear that you also need to copy libVLC.dll to the same folder.
  3. You need to add a media file to the playlist before you can play it.
0
votes

Found this old thread as now it's May 2018 and I still came across this problem. Turns out that because I've installed the 64 bit version of VLC, it won't work. Need to install the 32 bit ver 3.02 and activex then works.