Visual Basic >
Visual Basic Forums
>
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
Answers
- 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)- Marked As Answer byRiquel_DongModeratorThursday, October 29, 2009 10:58 AM
All Replies
- 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)- Marked As Answer byRiquel_DongModeratorThursday, October 29, 2009 10:58 AM
- 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.
- When I select a 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) - 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.
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)


