EnumerableToDispatchMarshaler Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Marshals the COM IDispatch
interface to the .NET Framework IEnumerable interface, and vice versa.
public ref class EnumerableToDispatchMarshaler : System::Runtime::InteropServices::ICustomMarshaler
public class EnumerableToDispatchMarshaler : System.Runtime.InteropServices.ICustomMarshaler
type EnumerableToDispatchMarshaler = class
interface ICustomMarshaler
Public Class EnumerableToDispatchMarshaler
Implements ICustomMarshaler
- Inheritance
-
EnumerableToDispatchMarshaler
- Implements
This custom marshaler marshals IDispatch
to IEnumerable and marshals IEnumerable to IDispatch
when a member with a DISPID of -4 exists. When you use the Type Library Importer (Tlbimp.exe) to create a class that implements IEnumerable , the CLR uses this custom marshaler automatically to bridge COM enumerators and .NET enumerators. Calling GetEnumerator results in IDispatch.Invoke
being called with a DISPID of -4, and vice versa.
Enumerable |
Provides the static class constructor. |
Clean |
Performs necessary cleanup of the managed data when it is no longer needed. |
Clean |
Performs necessary cleanup of the unmanaged data when it is no longer needed. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Returns an instance of the custom marshaler. |
Get |
Returns the size in bytes of the unmanaged data to be marshaled. |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Marshal |
Marshals an object from managed code to unmanaged code. |
Marshal |
Marshals an object from unmanaged code to managed code. |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the current object. (Inherited from Object) |
Product | Versions |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: