Variant.ToVariant Method
Converts the given variant object to a Variant class object.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
‘선언
Public Shared Function ToVariant ( _
ptr As IntPtr _
) As Variant
‘사용 방법
Dim ptr As IntPtr
Dim returnValue As Variant
returnValue = Variant.ToVariant(ptr)
public static Variant ToVariant(
IntPtr ptr
)
public:
static Variant ToVariant(
IntPtr ptr
)
static member ToVariant :
ptr:IntPtr -> Variant
public static function ToVariant(
ptr : IntPtr
) : Variant
Parameters
- ptr
Type: System.IntPtr
[in] An IntPtr to be marshaled as a variant object.
Return Value
Type: Microsoft.VisualStudio.Package.Variant
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.