more unmanaged/managed questions

  • Thread starter Thread starter jraul
  • Start date Start date
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?
 
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.
 
Back
Top