Partager via


Variant.ToVariant(IntPtr) Method

Definition

Converts the given variant object to a Variant class object.

public:
 static Microsoft::VisualStudio::Package::Variant ToVariant(IntPtr ptr);
public static Microsoft.VisualStudio.Package.Variant ToVariant (IntPtr ptr);
static member ToVariant : nativeint -> Microsoft.VisualStudio.Package.Variant
Public Shared Function ToVariant (ptr As IntPtr) As Variant

Parameters

ptr
IntPtr

nativeint

[in] An IntPtr to be marshaled as a variant object.

Returns

If successful, returns a Variant object containing the value of the marshaled variant object; otherwise, returns an empty Variant object.

Remarks

This method is used by the HandlePreExec method on the ViewFilter class to convert the marshaled variant object to a language service-specified Variant object.

Applies to