Variant.ToVariant Method
Converts the given variant object to a Variant class object.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Syntax
'宣言
Public Shared Function ToVariant ( _
ptr As IntPtr _
) As Variant
public static Variant ToVariant(
IntPtr ptr
)
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.