How to declare a managed variable as a member of a not-managed class?

  • Thread starter Thread starter René Estrella
  • Start date Start date
R

René Estrella

I need to declared a managed variable as a member of a class that is not
managed. How can I do that? Please, don't say I have to declare the class
as a managed one, because I can't apply that solution. Please, give me
other solution. Thanks.
 
René Estrella said:
I need to declared a managed variable as a member of a class that is
not managed. How can I do that? Please, don't say I have to declare
the class as a managed one, because I can't apply that solution.
Please, give me other solution. Thanks.

You have to use the gcroot template. See the <vcclr.h> header file, and
section 16.2, page 125 of the managed extensions document that's included
with VC++ (it's in your VC7 directory, in case you haven't located it).

-cd
 
Back
Top