System.Runtime.InteropServices.Marshal.GetNativeVariantForObject Method

Converts an object to a COM VARIANT.

Syntax

public static void GetNativeVariantForObject (object obj, IntPtr pDstNativeVariant)

Parameters

obj
The object for which to get a COM VARIANT.
pDstNativeVariant
A pointer to receive the VARIANT that corresponds to the obj parameter.

Remarks

The pDstNativeVariant parameter must point to sufficient memory to store the resulting VARIANT. Also, the implementation of this method calls VariantInit on the raw memory that the pDstNativeVariant parameter points to.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0