Can a VB6 project use a .Net .dll

10,548

Yes, but you need to make the .Net types Com Visible. 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...

Share:
10,548

Related videos on Youtube

webdad3
Author by

webdad3

Been programming for a while, and I can honestly say I've embraced my inner nerdiness. By doing so that has helped my programming skills as I work on a side project almost every night after coding for my job. I really think mobile application development is where the future of the industry is going. Most of my side projects are now related to the Windows Phone 8 and Windows 8. However, I do all my web work using PHP and MVC. I try to follow the mantra of keep it simple stupid! I'm focusing on networking and becoming part of the community of developers. Not only to help myself, but also to help others. Wisdom is earned through many failures (big and small). You can also follow me on Twitter!

Updated on June 04, 2022

Comments

  • webdad3
    webdad3 almost 2 years

    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!

  • taylonr
    taylonr about 13 years
    Sounds like this might be a good idea in this case. Start by upgrading business logic in a new .NET dll. Then upgrade another piece etc until you rewrite the gui.
  • DarinH
    DarinH about 13 years
    Gotta agree. Unless the project is just really really big, it's likely going to be more work to create a Vb6 callable .net lib that it would be to port things to .net and move forward. Migrating peicemeal always +sounds+ great, but it's usually not worth it unless the project size is quite large.
  • Matt Wilko
    Matt Wilko almost 13 years
    +1 - There are some other considerations to bear in mind. Like 1 based arrays in VB6 compared with 0 based arrays in .NET. Fixed length string are not fully supported in .NET and data types are different sizes for the same type (VB6 Long = .NET Int32)
  • luchosrock
    luchosrock about 11 years
    but what if you're migrating a dll and you want to keep the client app untouched (without recompile)?
  • live2
    live2 about 4 years