|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
This class converts data between native and managed environments.
Use the marshal_context class for data conversions that require a context. See Overview of Marshaling in C++ for more information about which conversions require a context and which marshaling file has to be included. The result of marshaling when you use a context is valid only until the marshal_context object is destroyed. To preserve your result, you must copy the data.
The same marshal_context can be used for multiple data conversions. Reusing the context in this manner will not affect the results from previous marshaling calls.