[Browse] [Tag cloud]

Log on:
Powered by Elgg

C/C++ for Beginners :: Blog :: C++ DLL

January 14, 2008

Does anyone know a handy tutorial on creating a .dll file to use c++ code in c#?

 Thanks,

Jon 

Keywords: c#, c++, dll

Posted by Jonathon Parrish @ C/C++ for Beginners | Share


Comments

  1. user icon

    Hahaha, ok.

    I've done this a lot recently and you basically have two ways to go about it.

     

    1) COM. Don't do it unless you're mad.

    2) Wrap each of your unmanaged classes up in a managed C++ CLI class in a mixed mode assembly and then just link to that with your C# project and use the classes as per usual.

    Most of the guides out there are for C++.NET and not C++CLI (entirely different things) and you don't want to be writing C++.NET oh Dear God No.

    This guide looks "ok", and starts off with a primer how to write C++CLI code, it's much like C++ really, but with lots of hats.

    Rob Ashton on Monday, 14 January 2008, 16:01 GMT # |

  2. user icon
    Thanks. Looks like it will be a difficult process as I've used structs all over.

    Jonathon Parrish on Tuesday, 15 January 2008, 18:40 GMT # |

You must be logged in to post a comment.

/