Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
TypeToTypeInfoMarshaler Class

TypeToTypeInfoMarshaler Class

Marshals the unmanaged ITypeInfo interface to the managed Type class, and marshals the managed Type class to the unmanaged ITypeInfo interface.

Namespace: System.Runtime.InteropServices.CustomMarshalers
Assembly: CustomMarshalers (in custommarshalers.dll)

public class TypeToTypeInfoMarshaler : ICustomMarshaler
public class TypeToTypeInfoMarshaler implements ICustomMarshaler
public class TypeToTypeInfoMarshaler implements ICustomMarshaler

The ITypeInfo interface exposed for a .NET type is based on the metadata that would appear in an exported type library. Likewise, the Type instance exposed for an ITypeInfo interface is based on the metadata that would appear in an imported assembly.

The Type Library Importer (Tlbimp.exe) marks ITypeInfo parameters with the appropriate MarshalAsAttribute with the CustomMarshaler enumeration member when converting signatures that use ITypeInfo parameters to signatures that use Type parameters.

The same conversion functionality can be accomplished without the custom marshaler, by calling GetITypeInfoForType and GetTypeForITypeInfo.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

© 2015 Microsoft