Partager via


Marshal.GetObjectForNativeVariant Méthode

Définition

Surcharges

GetObjectForNativeVariant(IntPtr)
Obsolète.

Convertit COM VARIANT en un objet.

GetObjectForNativeVariant<T>(IntPtr)
Obsolète.

Convertit COM VARIANT en un objet de type spécifié.

GetObjectForNativeVariant(IntPtr)

Source:
Marshal.NoCom.cs
Source:
Marshal.NoCom.cs
Source:
Marshal.NoCom.cs

Attention

GetObjectForNativeVariant(IntPtr) may be unavailable in future releases.

Convertit COM VARIANT en un objet.

public:
 static System::Object ^ GetObjectForNativeVariant(IntPtr pSrcNativeVariant);
[System.Obsolete("GetObjectForNativeVariant(IntPtr) may be unavailable in future releases.")]
[System.Security.SecurityCritical]
public static object GetObjectForNativeVariant (IntPtr pSrcNativeVariant);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static object? GetObjectForNativeVariant (IntPtr pSrcNativeVariant);
[System.Obsolete("GetObjectForNativeVariant(IntPtr) may be unavailable in future releases.")]
public static object GetObjectForNativeVariant (IntPtr pSrcNativeVariant);
public static object? GetObjectForNativeVariant (IntPtr pSrcNativeVariant);
public static object GetObjectForNativeVariant (IntPtr pSrcNativeVariant);
[System.Security.SecurityCritical]
public static object GetObjectForNativeVariant (IntPtr pSrcNativeVariant);
[<System.Obsolete("GetObjectForNativeVariant(IntPtr) may be unavailable in future releases.")>]
[<System.Security.SecurityCritical>]
static member GetObjectForNativeVariant : nativeint -> obj
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member GetObjectForNativeVariant : nativeint -> obj
[<System.Obsolete("GetObjectForNativeVariant(IntPtr) may be unavailable in future releases.")>]
static member GetObjectForNativeVariant : nativeint -> obj
static member GetObjectForNativeVariant : nativeint -> obj
[<System.Security.SecurityCritical>]
static member GetObjectForNativeVariant : nativeint -> obj
Public Shared Function GetObjectForNativeVariant (pSrcNativeVariant As IntPtr) As Object

Paramètres

pSrcNativeVariant
IntPtr

nativeint

Pointeur vers un VARIANT COM.

Retours

Objet qui correspond au paramètre pSrcNativeVariant.

Attributs

Exceptions

pSrcNativeVariant n'est pas un type VARIANT valide.

pSrcNativeVariant a un type non pris en charge.

Remarques

GetObjectForNativeVariant retourne un objet managé qui correspond à un pointeur brut vers un type VARIANT non managé. L’interopmarshaler effectue la transformation identique lors de l’exposition d’un type VARIANT au code managé.

GetObjectForNativeVariant fournit les fonctionnalités opposées de Marshal.GetNativeVariantForObject.

Lorsque le type VARIANT est VT_ERROR, GetObjectForNativeVariant retourne un objet de type Int32 au lieu de UInt32.

Voir aussi

S’applique à

GetObjectForNativeVariant<T>(IntPtr)

Source:
Marshal.NoCom.cs
Source:
Marshal.NoCom.cs
Source:
Marshal.NoCom.cs

Attention

GetObjectForNativeVariant<T>(IntPtr) may be unavailable in future releases.

Convertit COM VARIANT en un objet de type spécifié.

public:
generic <typename T>
 static T GetObjectForNativeVariant(IntPtr pSrcNativeVariant);
[System.Obsolete("GetObjectForNativeVariant<T>(IntPtr) may be unavailable in future releases.")]
[System.Security.SecurityCritical]
public static T GetObjectForNativeVariant<T> (IntPtr pSrcNativeVariant);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static T? GetObjectForNativeVariant<T> (IntPtr pSrcNativeVariant);
[System.Obsolete("GetObjectForNativeVariant<T>(IntPtr) may be unavailable in future releases.")]
public static T GetObjectForNativeVariant<T> (IntPtr pSrcNativeVariant);
public static T GetObjectForNativeVariant<T> (IntPtr pSrcNativeVariant);
[System.Security.SecurityCritical]
public static T GetObjectForNativeVariant<T> (IntPtr pSrcNativeVariant);
[<System.Obsolete("GetObjectForNativeVariant<T>(IntPtr) may be unavailable in future releases.")>]
[<System.Security.SecurityCritical>]
static member GetObjectForNativeVariant : nativeint -> 'T
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member GetObjectForNativeVariant : nativeint -> 'T
[<System.Obsolete("GetObjectForNativeVariant<T>(IntPtr) may be unavailable in future releases.")>]
static member GetObjectForNativeVariant : nativeint -> 'T
static member GetObjectForNativeVariant : nativeint -> 'T
[<System.Security.SecurityCritical>]
static member GetObjectForNativeVariant : nativeint -> 'T
Public Shared Function GetObjectForNativeVariant(Of T) (pSrcNativeVariant As IntPtr) As T

Paramètres de type

T

Type dans lequel convertir COM VARIANT.

Paramètres

pSrcNativeVariant
IntPtr

nativeint

Pointeur vers un VARIANT COM.

Retours

T

Objet du type spécifié qui correspond au paramètre pSrcNativeVariant.

Attributs

Exceptions

pSrcNativeVariant n'est pas un type VARIANT valide.

pSrcNativeVariant a un type non pris en charge.

Remarques

GetObjectForNativeVariant<T>(IntPtr) retourne un objet managé de type T qui correspond à un pointeur brut vers un type VARIANT non managé. L’interopmarshaler effectue la transformation identique lors de l’exposition d’un type VARIANT au code managé.

GetObjectForNativeVariant<T>(IntPtr) fournit les fonctionnalités opposées de GetNativeVariantForObject<T>(T, IntPtr).

S’applique à