Error while using a COM component in winform

2

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?

c#
winforms
.net-4.0
vlc
libvlc
asked on Stack Overflow Mar 28, 2013 by Vinshi

2 Answers

3

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.
answered on Stack Overflow Sep 11, 2013 by Victor Stoddard • edited Feb 12, 2015 by Victor Stoddard
0

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.

answered on Stack Overflow May 4, 2018 by kendolew

User contributions licensed under CC BY-SA 3.0