MarshalManagedToNative Method
Collapse the table of content
Expand the table of content

EnumerableToDispatchMarshaler.MarshalManagedToNative Method (Object)


Marshals an object from managed code to unmanaged code.

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

public virtual IntPtr MarshalManagedToNative(
	object pManagedObj


Type: System.Object

The managed object to be converted.

Return Value

Type: System.IntPtr

A pointer to the unmanaged object.

Exception Condition

pManagedObj is null.

The CLR calls this method with the specified instance of a managed object to convert that object from managed code to unmanaged code, and it returns a pointer to the appropriate unmanaged object, representing the COM view of that object.

.NET Framework
Available since 1.1
Return to top
© 2016 Microsoft