[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 328
  • Last Modified:

Error with interop dll

When running a vb.net application installed on another machine than the dev machine  the application gives me the following error:

Com object with CLSID {blabla} is ether not valid or not registered

It happens whenever the app calls an interop com object (eg creates an instance).

Is it really necessary to register the interop com dll, or are there other ways so that registration is not necessary?

If I have to register, do I have to use gacutil or how do I do it?

If the interop.blabla.dll does not have a strong name (name, version, public key), how can I change it so that it has a strong name and can be added to the gac (if necessary at all)?
0
netslt
Asked:
netslt
  • 3
  • 2
1 Solution
 
netsltAuthor Commented:
Additional Question: do I have to register the interop.blabla.dll or the original .dll?
0
 
Bob LearnedCommented:
The original DLL needs to be registered, just like in the past with COM libraries.  The Interop DLL is a wrapper class that transforms the calls into .NET-understandable calls.  The Interop library can be in the GAC, but the COM library can be anywhere you want it to be, since the location is determined from the Windows Registry.

Bob
0
 
netsltAuthor Commented:
So there is no other way than registering these dll's?
0
 
Bob LearnedCommented:
When working with COM libraries, the answer is No.

Bob
0
 
netsltAuthor Commented:
OK, I configured the installer to register the dll, the app works fine now.

Thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now