We have a .Net DLL. We need to call this DLL from a VB Application. What are the procedures we need to follow?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The last time I did this, it got so thorny (some irrelevant issues involving COM+, deployment, etc tripping us up) that I actually ditched the COM boundary, and re-wrote the interface as a POX web-service talking to a handler (ashx) in the .NET. I would give serious consideration to this approach… (unless you need to share windows handles, or similar)
If you really want a COM API, you need to generate a COM-callable wrapper; this is largely a case of:
[ComVisible(true)]tlbexeto export the type library if you needregasmto register the type in COM (either in the GAC or from a fixed location on a drive)After that your VB6 should just see it as another COM package, but I strongly recommend that you limit this interface to the bare minimum; it isn’t change-friendly, and the VB6-style interface forwarding (i.e. where you can get away with adding a method, without breaking binary compatibility) is not here.