Madhu Cheriyedath wrote:

> 1) Use P/Invoke in Visual Basic.NET and call the functions in the DLL

This should certainly work, and is the path of least resistance, especially
since I'm assuming that the DLL currently just exports a bunch of functions
(since you couldn't have directly consumed a C++ class from VB4).

> 2) Recompile the C++ DLL using IJW switch so that it will be a managed one.

Compiling with /CLR doesn't buy you anything until you have managed classes
wrapping the existing C++ classes and/or functions. This is more work, but
depending on your needs, may also offer more flexibility (because you get to
move things into objects that can not only be created, but extended).

>From what little details you provided, my guess is that you should probably
start with #1, and really only approach #2 if you need additional support
(especially if you plan to eventually port the unmanaged C++ to purely
managed C++ or even C#).

Brad

--
Read my web log at http://www.quality.nu/dotnetguy/

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to