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)

System.Object
  System.Runtime.InteropServices.CustomMarshalers.TypeToTypeInfoMarshaler

public class TypeToTypeInfoMarshaler : ICustomMarshaler

NameDescription
System_CAPS_pubmethodCleanUpManagedData(Object)

Performs necessary cleanup of the managed data when it is no longer needed.

System_CAPS_pubmethodCleanUpNativeData(IntPtr)

Performs necessary cleanup of the unmanaged data when it is no longer needed.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetInstance(String)

Returns an instance of the custom marshaler.

System_CAPS_pubmethodGetNativeDataSize()

Returns the size in bytes of the unmanaged data to be marshaled.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodMarshalManagedToNative(Object)

Marshals an object from managed code to unmanaged code.

System_CAPS_pubmethodMarshalNativeToManaged(IntPtr)

Marshals an object from unmanaged code to managed code.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

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.

.NET Framework
Available since 1.1

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

Return to top
Show: