C# app with C++ DLL

O

Oleg

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.
 
M

Mattias Sjögren

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

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



Mattias
 
O

Oleg

-----Original Message-----
Oleg,


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

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 ?
 
M

Mattias Sjögren

As I told earlier the DLL must remain unmanaged since
it's used by other application....

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

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

or managed and unmanaged C++ classes can reside in the
same DLL ?

Yes



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top