1

I have a piece of code contained in a function that is duplicated in a VB.NET project and VB6 project. Long term the VB6 project will be phased out. However, short term I want the VB6 project to call the VB.NET function. I see a number of options:

1) Add VB.NET reference to VB6 project
2) Expose the VB.NET functionality to the VB6 project via a web service

Performance is important. I am trying to decide the best option.

2
  • 1
    Check this out: stackoverflow.com/questions/2253875/… Commented Apr 7, 2014 at 18:18
  • The Web Service route wouldn't require you to ensure COM compatibility for your .NET assembly. Commented Apr 7, 2014 at 18:59

2 Answers 2

1

You can use vb.net to make a COM dll and call it from VB6. Here's an example (older; vs2005):

http://www.codeproject.com/Articles/28591/Creating-a-COM-DLL-with-VS-A-Walkthrough

Sign up to request clarification or add additional context in comments.

Comments

0

I think that you have several options: 1) Web Service (performance will be affected because of the serialization or deserialization of parameters) 2) Expose functionality using COM or COM+ 3) Or if you need to use a VB.NET UserControl you can use the Forms Interop Toolkit (nice article on code project https://www.codeproject.com/Articles/18954/%2FArticles%2F18954%2FInterop-Forms-Toolkit-2-0-Tutorial) 4) I have not verified this option but you might be able to also use XAML islands

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.