Calling VB.NET dll from C++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manashe
    New Member
    • Nov 2007
    • 1

    Calling VB.NET dll from C++

    I have a C++ application exe that uses a C++ dll. I don't have the source of this C++ application and
    cannot rebuild it. But I know that it uses the traditional LoadLibrary and GetProcAddress to access individual functions in the dll.
    For some reasons, I want to replace the C++ dll with a VB.NET dll.
    The dll is not and ActiveX and is therefore not registered.
    I think I cannot use a class but a module since the C++ exe application does not expect any class in the dll.
    In all my attempts, I could not have the inner functions of the VB.NET to be called by the C++ exe.
    How should I write the VB.NET dll?

    Thanks for the help.
  • Joseph Martell
    Recognized Expert New Member
    • Jan 2010
    • 198

    #2
    I'm not sure if this is exactly what you are looking for, but you might want to check out interop assemblies (search MSDN for "interop" and it should be the first few links).

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      An "interop" class is a wrapper class that allows .NET code to use un-managed (non-.NET code). Look up "marshallin g" or "marshaling " for more details on this topic.

      By the sounds of it, the OP is not looking for a wrapper class but wants to recreate the functionality in the C++ class library in VB.NET

      -Frinny

      Comment

      Working...