Re: C# dll called from VB 6.0
ok final :) i made it. it works on my comp :) it's just a simple test but it works :) now one more thing.
I have the exe from my VB project and the dll and tlb from C#. How can I strat this project on another comp having only this 3 files? Beacuse if I try to register the dll it sais that no entry point was found :(
Re: C# dll called from VB 6.0
Quote:
Originally Posted by vma
ok final :) i made it. it works on my comp :) it's just a simple test but it works :) now one more thing.
I have the exe from my VB project and the dll and tlb from C#. How can I strat this project on another comp having only this 3 files? Beacuse if I try to register the dll it sais that no entry point was found :(
You will need to create a Setup package for the C# DLL using the Setup & Deployment Projects in VS.NET. Then only you will be able to use the DLL. This setup package will take care of registering the DLL and installing it in Global Assembly Cache.
Refer your MSDN documentation on how to create setup packages for VS.NET projects.
Re: C# dll called from VB 6.0
About the GAC. It keeps a copy of every version of a DLL. OK for MS, etc, but what if we do minor updates all the time, like v1.0, 1.0,1, 1.0.2... etc
will the GAC get filled with useless versions? Will we need to delete old versions from there etc?
BTW, why do we need the interface ? Is there a way to do without it? :confused:
We never ref it in VB and VB can't autocomplete its members. It's really time consuming too, to dupe every public class thing to make an interface.
Is there a quicker way to 'COM' an existing class?
Re: C# dll called from VB 6.0
Obviously you CAN delete items from the GAC (don't do it manually though, use prog)... typically when you deploy you would have billions of verion numbers there.
No you have to have an interface because of the way the VB code needs top talk to the .NET dll class lib. VB6 uses COM to talk to a MS dll which in turn talks to the .NET dll. It is not possible to generate the correct type lib from your .NET dll with out using interfaces. You most certainly do reference it in VB... you just probably don't know about it, because it is so well hidden.
To "COM" an existing class... simply make a stub. it is the best method for doing such things. HECK if you REALLY wanna get smart you can generate a new interface class from you .NET dll, compile it into a "COM" interface (all automated)!!! .NET includes all the functionality to do so.
But that is getting SERIOUSLY trigger happy ;-).
Re: C# dll called from VB 6.0
Another thing. How come we don't need to put it in the GAC on our development machines?
Re: C# dll called from VB 6.0
Quote:
Originally Posted by FoodBard
Another thing. How come we don't need to put it in the GAC on our development machines?
Thats because when you select "Register For COM Interop" in the Project Properties, it automatically registers it in the GAC when you build the project.