Marshaling C# Help

Data passed from .NET to the COM component and the other way around musl be converted to the corresponding representation, This mechanism is also known as marshaling. What happens here depends on the data type of the data that is passed: You have to differentiate between blittable and nonblittable data types.

Blittable data types have a common representation with both .NET and COM, and no conversion is needed Simple data types such as byte, short, int, long, and classes and arrays that,only contain, these simple data types belong to the blittable data types, Arrays must be one-dimensional to be blittable.

Figure 24-6

Figure 24-6

A conversion is needed with nonblittable data types,The following table lists some of the nonblittable COM data types with their .NET-related data types., Nonblittable types have a higher overhead because of the conversion.

Posted on October 27, 2015 in Interoperability

Share the Story

Back to Top
Share This