Visual Basic Development Bookmark and Share   
 Home > Visual Basic Interop and Upgrade > Reference to dll/tlb in registration free interop
 

Reference to dll/tlb in registration free interop

Sorry for stupid question, but I am not familiar with VB.Net.
I have a .Net asssembly in dll file and it is supposed to be a COM server in reg free interop. The corresponding manifest is embedded and I successfully used it from C++ client.
Now I would like to do it from VB.Net. How could I create a reference to this dll? In C++ I had generated tlb and then used #import "tiplib.tlb" in my code. What is the way to do it in VB.Net?

Also, it is a bit offtop but probably someone hase an idea if it's possilbe to use reg free interop in VBA?

Thanks in advance

novy13  Tuesday, October 20, 2009 8:53 AM
You would use a manifest for Visual Basic .NET as well. See if the following articles help:

http://msdn.microsoft.com/en-us/magazine/cc188708.aspx
http://msdn.microsoft.com/en-us/library/ms973913.aspx


Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Tuesday, October 20, 2009 8:24 PM
You would use a manifest for Visual Basic .NET as well. See if the following articles help:

http://msdn.microsoft.com/en-us/magazine/cc188708.aspx
http://msdn.microsoft.com/en-us/library/ms973913.aspx


Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Tuesday, October 20, 2009 8:24 PM
Hi Paul, thanks for reply.
I have read both this articles and a lot of others. I understand that I probably missed some small and stupid thing but I am stucked on it.

I understnad that I need a manifest file for vb.net as well, but I can't compile my VB project. As soon as I try to create an instance of an object compiler gives me error. So I need somehow make a reference to data types which are used in dll (C++ uses tlb for it). One of this article has a sample in vb6 and it suggestion is to to add a reference to dll and set "Isolated" options for it to true, but there is now Isolated option in VB.Net.
novy13  Tuesday, October 20, 2009 11:19 PM
When I selecta COM component in References list of a (VB.NET) project I see an Isolated property in the Properties window. Are you saying that you don't see this property?

The first article indicates that the COM component needs to be registered on the developer's machine. Have you done this?
Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Thursday, October 22, 2009 12:48 PM
What version of VS do you use?

No, I haven't registered COM on my machine. What I try to do is to use _registration free_ interop.
novy13  Saturday, October 31, 2009 5:09 AM

I believe I tested with Visual Studio 2005. As I mentioned, during the development process COM components must be registered in order to be used in a .NET project. That is documented in one of the articles I referenced. Registration-free COM is for deployment (when you're installing the application), not development.


Paul ~~~~ Microsoft MVP (Visual Basic)
Paul P Clement IV  Saturday, October 31, 2009 3:13 PM

You can use google to search for other answers

Custom Search

More Threads

• what is the difference in VB6 NPV and vb.net NPV
• Visual Basic and MS Access capabiliyu
• Conversion Error
• Events using Interop Forms Toolkit 2.0a to Integrate with Microsoft Dynamics NAV (formally Navision)
• How can I Upgrade "Screen.MousePointer"?
• VB problem with user Control
• Out of process .NET DLL used in VB6?
• REGTLIB.EXE
• Moving to another computer
• vb6 to .NET 2003 upgrade issue