How Do I Reference a COM DLL?

T

TC

I posted this question earlier, but didn't receive a reply, so I'm
going to rephrase it and try again.

I have a VB.NET application which requires a COM DLL. When I add a
reference to the DLL, Visual Studio creates an Interop DLL. That seems
okay. I can compile the application and run it on my development
computer.

When I copy the executable and all the DLLs over to the production
computer, however, the system does not use the COM DLL I put in the
application folder. It uses a different DLL which has a bug and causes
my application to fail.

Why is the system using the wrong DLL? How do I force it to use the
right one?


-TC
 
K

kimiraikkonen

I posted this question earlier, but didn't receive a reply, so I'm
going to rephrase it and try again.

I have a VB.NET application which requires a COM DLL. When I add a
reference to the DLL, Visual Studio creates an Interop DLL. That seems
okay. I can compile the application and run it on my development
computer.

When I copy the executable and all the DLLs over to the production
computer, however, the system does not use the COM DLL I put in the
application folder. It uses a different DLL which has a bug and causes
my application to fail.

Why is the system using the wrong DLL? How do I force it to use the
right one?

-TC

Was that DLL located and referenced from windows\system32 folder?
 
F

Family Tree Mike

Did you register (regsvr32) the com dll? Is this a 3rd party dll? If so,
which version is the later version?
 
T

TC

Did you register (regsvr32) the com dll?  Is this a 3rd party dll?  Ifso,
which version is the later version?









- Show quoted text -

Kimiraikkonen and Mike,

Thank you for responding to my post. Here are details:

- Neither DLL is located in windows\system32.

- It is a 3rd party DLL. The buggy version is newer (1.3.4.333) than
the good version (1.3.1.247).

- The buggy version is registered. The good version is not. I'm afraid
to register the good version because I don't know what that will do to
the buggy version. This is the production computer, and other software
may rely on the buggy version.


-TC
 
F

Family Tree Mike

TC said:
Kimiraikkonen and Mike,

Thank you for responding to my post. Here are details:

- Neither DLL is located in windows\system32.

- It is a 3rd party DLL. The buggy version is newer (1.3.4.333) than
the good version (1.3.1.247).

- The buggy version is registered. The good version is not. I'm afraid
to register the good version because I don't know what that will do to
the buggy version. This is the production computer, and other software
may rely on the buggy version.


-TC

I think you have a few options. You might try debugging on a development
version with the newer dll. This may be futile as you seem to indicate that
the newer dll is buggy. Another choice is looking up examples of reg-free
com. There are numerous blogs on how to do this. This could help in this
situation.
 
K

kimiraikkonen

Kimiraikkonen and Mike,

Thank you for responding to my post. Here are details:

- Neither DLL is located in windows\system32.

- It is a 3rd party DLL. The buggy version is newer (1.3.4.333) than
the good version (1.3.1.247).

- The buggy version is registered. The good version is not. I'm afraid
to register the good version because I don't know what that will do to
the buggy version. This is the production computer, and other software
may rely on the buggy version.

-TC

Another option: If your dll has no dependecy except your app, you can
rename buggy version to something before the installation to force not
to register a unwanted dll. Then leave the correct version and let
your app app is installed the bug-free dll must have registered and
must be in use.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top