EnumeratorToEnumVariantMarshaler Class

 

Marshals the COM IEnumVARIANT interface to the .NET Framework IEnumerator interface, and vice versa.

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

System.Object
  System.Runtime.InteropServices.CustomMarshalers.EnumeratorToEnumVariantMarshaler

public class EnumeratorToEnumVariantMarshaler : 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.)

This custom marshaler marshals IEnumVARIANT to IEnumerator and marshals IEnumerator to IEnumVARIANT. The CLR automatically uses this class to bridge COM enumerators and .NET enumerators. The IEnumerator type returned by the GetEnumerator method in the imported COM class uses EnumeratorToEnumVariantMarshaler to map the calls to the IEnumVARIANT interface pointer returned by the COM object's member with a DISPID of -4.

.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: