none
Need some advice on an App DLL RRS feed

  • Question

  • I have an application that is written using .NET (managed C++), but I want to put some unmanaged code into a DLL and call it from the .NET application.  First off, what type of DLL should I create?  They DLL must be able to compile and run C++ code (and link against C++ dlls).
    Tuesday, June 15, 2010 5:11 PM

Answers

  • You can use a mixed mode DLL written in C++/CLI, a COM DLL (either ActiveX or COM objects)  or a standard DLL with a C interface.

    For a mixed mode C++/CLI dll your clients need to add a project or assembly reference to the DLL project. 

    For a COM DLL your clients need to add a COM reference and wrap your native code in a COM object or ActiveX.

    For a standard DLL with a C interface your dll clients need to use platform-invoke.



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    • Marked as answer by SamAgain Wednesday, June 23, 2010 9:32 AM
    Tuesday, June 15, 2010 6:15 PM