We help IT Professionals succeed at work.

COM INTEROP

MMTadmin
MMTadmin asked
on
I am returning an adodb recordset from a .net com interop dll to VB6 which works perfectly on my development machine but as soon as I try it on a virtual machine it fails, hard to say where!

I am registering the tlb library for the .net dll on the virtual machine and also .net 2.0 is installed and I have adodb.dll in the directory where the .net dll is running also

The recordset I am creating is a manual one

It is definitely due to something I am not distributing or including on the virtual machine but I cannot work out what?

Any ideas?
Comment
Watch Question

Éric MoreauSenior .Net Consultant
Top Expert 2016
Commented:
adodb needs to be installed and registered (like any other COM component) on the computer where it runs. you better create an installation package for your project
COM uses the registry. You can't just copy a COM dll into the same folder, like you can a C dll or a .net dll.

You need to register the COM dll with revsvr32.exe

Interop can be a nightmare to troubleshoot. In this simple scenario, you could make a small VB6 app that uses adodb.dll and use it to test a target machine.

The sysinternal tools (now on microsoft's site) are also invaluable for troubleshooting COM by watching registry searches, file searches, etc.