views:

2507

answers:

2

I have a third party COM dll that I'm trying to add to a vb.net (2008 express) project. I put the dll in C:\WINDOWS\system32\ and registered it with "regsvr32 vxncom.dll". When I go to projects > add reference and go to the COM tab it shows up in the list of available components/libraries. But, when I select the library and hit ok, visual studio complains: "A reference to 'vxncom 4.0 Library' could not be added. Could not register the ActiveX type library 'C:\WINDOWS\system32\vxncom.dll'."

The project I am doing this in is an example provided by the folks who distribute the dll. The component also fails to be added when I start a new (blank) vb.net project.

UPDATE 1:

I ran dependency walker on the dll in question and here's what I got in the error log:

Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.

The module in question seems to be libeay32.dll, but it already exists in C:\WINDOWS\system32.

UPDATE 2:

I went to the openssl site and downloaded and used their installer to update the libeay32.dll. I ran dependency walker again on vxncom.dll, and there were no errors. Went back to visual studio and it still didn't want to add the reference. Exact same error as before.

+1  A: 

Maybe the DLL VB is trying to register depends on another DLL that is not present. You can confirm this (or rule it out) by using the free Dependency Walker tool from http://www.dependencywalker.com/

RESPONSE TO UPDATE 1: Sounds like there's a mismatch between the version of libeay32.dll that's installed on your system and the one that your component is expecting -- depends is saying that your component is looking for a function that isn't there. I would check the version number of libeay32 and then contact the vendor and ask them what versions they support.

jeffm
I ran dependency walker on the dll in question and here's what I got in the error log:Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.The module in question seems to be libeay32.dll, but it already exists in C:\WINDOWS\sy...
A: 

Just a thought - you may get a more detailed error message if you create your own PIA using tlbimp.exe, rather than relying on the IDE to do it for you.

Christian Hayter