UnmanagedMarshal Class
Represents the class that describes how to marshal a field from managed to unmanaged code. This class cannot be inherited.
For a list of all members of this type, see UnmanagedMarshal Members.
System.Object
System.Reflection.Emit.UnmanagedMarshal
[Visual Basic] <Serializable> NotInheritable Public Class UnmanagedMarshal [C#] [Serializable] public sealed class UnmanagedMarshal [C++] [Serializable] public __gc __sealed class UnmanagedMarshal [JScript] public Serializable class UnmanagedMarshal
Thread Safety
Reflection Emit is thread-safe when using assemblies that were created with the AppDomain.DefineDynamicAssembly method with the Boolean parameter isSynchronized set to true.
Remarks
Marshaling is the process of packaging and unpackaging parameters so remote procedure calls can occur. During marshaling, a field might undergo a format conversion when the format of the managed type is different from the format of the corresponding unmanaged type. For example, you might want to marshal a String type as an unmanaged BSTR. Some format conversions are handled automatically by the runtime. To override the default behavior, you must use the UnmanagedMarshal class to define the format conversion.
Requirements
Namespace: System.Reflection.Emit
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: Mscorlib (in Mscorlib.dll)
See Also
UnmanagedMarshal Members | System.Reflection.Emit Namespace | Type | UnmanagedType | Guid