more unmanaged/managed questions

J

jraul

So from some experiments, is it correct that a managed class can
contain a pointer to an unmanaged class?

But, a managed class cannot contain an instance of an unmanaged class?


Can a C# application have a reference to a unmanaged class created
with a C++/CLI project?

If not, is the strategy to just create a managed class that wraps the
unmanaged class?
 
B

Bruno van Dooren

So from some experiments, is it correct that a managed class can
contain a pointer to an unmanaged class?
Yes.

But, a managed class cannot contain an instance of an unmanaged class?

Not at the moment.
Can a C# application have a reference to a unmanaged class created
with a C++/CLI project?

No. Only C style exported functions and COM servers can be reused as native
code by C# or VB.NET.
If not, is the strategy to just create a managed class that wraps the
unmanaged class?

Yes. That or create a COM server.
 

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