C# app with C++ DLL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Oleg

    C# app with C++ DLL

    Hi ,

    How can I use classes implemented in C++ (unmanaged and
    packed in DLL) by C# application ?

    I'm not talking about DLL function invocation that passes
    primitives but about entire class usage (data and
    functions).

    Thanks a lot !

    P.S. The DLL must stay unmanages since it's used by other
    application.
  • Mattias Sjögren

    #2
    Re: C# app with C++ DLL

    Oleg,
    [color=blue]
    >How can I use classes implemented in C++ (unmanaged and
    >packed in DLL) by C# application ?[/color]

    The easiest way is probably to write a wrapper in Managed C++ for it.



    Mattias

    --
    Mattias Sjögren [MVP] mattias @ mvps.org

    Please reply only to the newsgroup.

    Comment

    • Oleg

      #3
      Re: C# app with C++ DLL

      [color=blue]
      >-----Original Message-----
      >Oleg,
      >[color=green]
      >>How can I use classes implemented in C++ (unmanaged and
      >>packed in DLL) by C# application ?[/color]
      >
      >The easiest way is probably to write a wrapper in[/color]
      Managed C++ for it.[color=blue]
      >
      >
      >[/color]

      Mattias

      As I told earlier the DLL must remain unmanaged since
      it's used by other application....
      or managed and unmanaged C++ classes can reside in the
      same DLL ?

      Comment

      • Mattias Sjögren

        #4
        Re: C# app with C++ DLL

        [color=blue]
        >As I told earlier the DLL must remain unmanaged since
        >it's used by other application....[/color]

        Right, but the MC++ wrapper can be compiled to a separate DLL.

        C# app -> MC++ DLL -> Native C++ DLL

        [color=blue]
        >or managed and unmanaged C++ classes can reside in the
        >same DLL ?[/color]

        Yes



        Mattias

        --
        Mattias Sjögren [MVP] mattias @ mvps.org

        Please reply only to the newsgroup.

        Comment

        Working...