0
votes

I have VB6 ActiveXDLL called A.dll , I am referencing this DLL into my VB.Net Application.

Now I am calling a function of A.dll in this project. A.dll function is referring to the function of B.dll, C.dll, C.dll further referrer to Z.dll and so on.

when I am executing application it gives an error from B.dll that ActiveX component can't create an object.

4
Check file permissions - if you're in a development environment loosen them to test. Also check the Windows registry settings for it. That's all I can recollect right now.John K

4 Answers

0
votes

My first thought would be to make sure all dlls are registered.

0
votes

Assuming the ActiveX DLL is VB6 and you have access to the VB6 IDE, ensure the class's Instancing property is set to Multiuse.

0
votes

Use OLE View (comes with visual studio) to browse ther TypeLib entry and check it has the correct GUID and that there is onely one registration. Can you create an object instance from the DLL with CreateObject? If not it is not registered correctly.

0
votes

Also check any dependencies / references used by A.dll
If it can't find something then it's going to fail.

These are the four common causes of the error:
1. You do not have a required TLB or ActiveX DLL/OCX file.
2. A TLB or ActiveX DLL/OCX needed by the project is present but not registered on your system.
3. The VB runtimes are an earlier version than the one you need to run the project.
4. A required TLB or ActiveX DLL/OCX file is corrupt.