Can a VB6 project use a .Net .dll

2019-07-02 14:00发布

问题:

I have a VB6 project. My question is can I call a .NET .dll that has all the business rules of the project (from the VB6 application)?

Basically I have a VB6 project with a classic ASP project calling a vb6/ActiveX .dll. The requirement is to figure out the best way to upgrade the application. So, if I update the ActiveX .dll can the VB6 app call that new .NET .dll?

I guess the same question is viable for the classic ASP project as well...

Thanks!

回答1:

Yes, but you need to make the .Net types Com Visible.

Here's a walkthrough

Also see Matt's comment below regarding array indices and strings.

The fact that it's possible doesn't make it a good idea though...