Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Creating a .Net wrapper

  • 18-01-2012 01:38PM
    #1
    Registered Users, Registered Users 2 Posts: 1,686 ✭✭✭


    Hi all,

    I am working on a native c++ dll but visual studios won't allow me to reference it because its not a COM or .NET.

    How do I wrap my dll to work with .Net.

    I am using code::Blocks (windows+ubuntu linux).


Comments

  • Registered Users, Registered Users 2 Posts: 2,062 ✭✭✭Colonel Panic


    Do you export C style functions from the DLL? If so use PInvoke, if you're exporting C++ classes in the DLL then first off, sad faces, second off, make a C++/CLI wrapper for the C++ classes and reference that from other .Net assemblies.

    Loads of examples of how to do it on PInvoke.net or you can post some code here if you need specific help.


Advertisement