Connecting Tech Pros Worldwide Forums | Help | Site Map

How Do I Reference a COM DLL?

TC
Guest
 
Posts: n/a
#1: Feb 11 '08
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

kimiraikkonen
Guest
 
Posts: n/a
#2: Feb 11 '08

re: How Do I Reference a COM DLL?


On Feb 11, 9:24*pm, TC <golemdan...@yahoo.comwrote:
Quote:
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?
=?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=
Guest
 
Posts: n/a
#3: Feb 11 '08

re: How Do I Reference a COM DLL?


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

"TC" wrote:
Quote:
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
>
TC
Guest
 
Posts: n/a
#4: Feb 12 '08

re: How Do I Reference a COM DLL?


On Feb 11, 12:04*pm, Family Tree Mike
<FamilyTreeM...@discussions.microsoft.comwrote:
Quote:
Did you register (regsvr32) the com dll? *Is this a 3rd party dll? *Ifso,
which version is the later version?
>
>
>
"TC" wrote:
Quote:
I posted this question earlier, but didn't receive a reply, so I'm
going to rephrase it and try again.
>
Quote:
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.
>
Quote:
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.
>
Quote:
Why is the system using the wrong DLL? How do I force it to use the
right one?
>
Quote:
-TC- Hide quoted text -
>
- 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
=?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=
Guest
 
Posts: n/a
#5: Feb 12 '08

re: How Do I Reference a COM DLL?




"TC" wrote:
Quote:
On Feb 11, 12:04 pm, Family Tree Mike
<FamilyTreeM...@discussions.microsoft.comwrote:
Quote:
Did you register (regsvr32) the com dll? Is this a 3rd party dll? If so,
which version is the later version?



"TC" wrote:
Quote:
I posted this question earlier, but didn't receive a reply, so I'm
going to rephrase it and try again.
Quote:
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.
Quote:
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.
Quote:
Why is the system using the wrong DLL? How do I force it to use the
right one?
Quote:
-TC- Hide quoted text -
- 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
>
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.
kimiraikkonen
Guest
 
Posts: n/a
#6: Feb 12 '08

re: How Do I Reference a COM DLL?


On Feb 12, 2:12 am, TC <golemdan...@yahoo.comwrote:
Quote:
On Feb 11, 12:04 pm, Family Tree Mike
>
>
>
<FamilyTreeM...@discussions.microsoft.comwrote:
Quote:
Did you register (regsvr32) the com dll? Is this a 3rd party dll? If so,
which version is the later version?
>
Quote:
"TC" wrote:
Quote:
I posted this question earlier, but didn't receive a reply, so I'm
going to rephrase it and try again.
>
Quote:
Quote:
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.
>
Quote:
Quote:
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.
>
Quote:
Quote:
Why is the system using the wrong DLL? How do I force it to use the
right one?
>
Quote:
Quote:
-TC- Hide quoted text -
>
Quote:
- 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
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.
Closed Thread