Is it possible to reference DLLs compiled from C++ code in a CSharp Component?

Hi All,

 

As the title says, I've compiled a Dll using C++ vs2008, when trying to add the dll file as a referenced assembly to a CSharp Component, a message box pops out saying "Could not add assembly".

 

Any ideas why, how can I overcome the problem?

 

Many thanks

 

Evert

  • up

    David Rutten

    Hi Evert,

    you cannot use classes in an "unmanaged" dll. You can however PInvoke into an unmanaged dll, but you're typically only allowed to transfer native types (bools, ints, doubles etc.)

    --
    David Rutten
    david@mcneel.com
    Poprad, Slovakia