The native pointer can point to any address. Please explain why you want to use native pointer to managed resource? It is very incorrect way. I think you should change your architecture instead of making such a thing. If you want to call managed code (method of managed object) from unmanaged context you should use callback. Handle can not point to native heap, but IntPtr can.
S
slawomir_orlowski
@slawomir_orlowski
Posts
-
Where is this managed object stored? -
Use of managed variables in non-ref classIt is possible to recompile native code as managed code. You can build wrapper class to expose unmanaged C++ code in CLI. Then you can use managed infrastructure in your code. Check G. Hogenson "C++/CLI" book.