locked
Operator Overloading RRS feed

  • Question

  • User-2114271817 posted

    I'm working together with someone on a project, but I'm writing code in VB.Net, and hes coding in VC++. I'm trying to get some kind of compatability going on, so I'm putting my support classes into a VB dll. I've tested it a little, and it seems that all of the functions work, but the operator overloading that I did in VB doesnt seem to carry over to C++. Any ideas?

    Thursday, July 15, 2010 4:16 PM

Answers

  • User-1802908944 posted

    vb.net

    http://www.developer.com/net/vb/article.php/3512311/Overloading-Operators-in-VBNET-20.htm

    C++

    http://www.codersource.net/c/c-miscellaneous/c-overloading-operators.aspx


    happy coding

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 16, 2010 1:39 AM
  • User-952121411 posted

    I've tested it a little, and it seems that all of the functions work, but the operator overloading that I did in VB doesnt seem to carry over to C++.
     

    There is a bigger issue at hand here.  You are trying to mix unmanaged C++ code with managed .NET (VB.NET) code.  If you wanted to call the C++ code from .NET, it probably wouldn't be as hard as you could add a reference and an Interop wrapper would be added to allow .NET to communicate with the unmanaged binary.  Having the C++ talk to VB.NET is a bit different. You need to look over the following links to see how the languages and binaries will work.

    How to import a .net DLL (C#) into a VC++ exe project?

    http://www.devhood.com/messages/message_view-2.aspx?thread_id=87334

    Using Unmanaged C++ Libraries (DLLs) in .NET Applications:

    http://www.codeproject.com/KB/mcpp/usingcppdll.aspx

    Using a .net compiled dll inside native c++:

    http://stackoverflow.com/questions/852048/using-a-net-compiled-dll-inside-native-c

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 16, 2010 10:23 AM

All replies

  • User-1802908944 posted

    vb.net

    http://www.developer.com/net/vb/article.php/3512311/Overloading-Operators-in-VBNET-20.htm

    C++

    http://www.codersource.net/c/c-miscellaneous/c-overloading-operators.aspx


    happy coding

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 16, 2010 1:39 AM
  • User-952121411 posted

    I've tested it a little, and it seems that all of the functions work, but the operator overloading that I did in VB doesnt seem to carry over to C++.
     

    There is a bigger issue at hand here.  You are trying to mix unmanaged C++ code with managed .NET (VB.NET) code.  If you wanted to call the C++ code from .NET, it probably wouldn't be as hard as you could add a reference and an Interop wrapper would be added to allow .NET to communicate with the unmanaged binary.  Having the C++ talk to VB.NET is a bit different. You need to look over the following links to see how the languages and binaries will work.

    How to import a .net DLL (C#) into a VC++ exe project?

    http://www.devhood.com/messages/message_view-2.aspx?thread_id=87334

    Using Unmanaged C++ Libraries (DLLs) in .NET Applications:

    http://www.codeproject.com/KB/mcpp/usingcppdll.aspx

    Using a .net compiled dll inside native c++:

    http://stackoverflow.com/questions/852048/using-a-net-compiled-dll-inside-native-c

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 16, 2010 10:23 AM