Partager via


Marshal.GetNativeVariantForObject Méthode

Définition

Surcharges

GetNativeVariantForObject(Object, IntPtr)
Obsolète.

Convertit un objet en COM VARIANT.

GetNativeVariantForObject<T>(T, IntPtr)
Obsolète.

Convertit un objet d’un type spécifié en COM VARIANT.

GetNativeVariantForObject(Object, IntPtr)

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

Attention

GetNativeVariantForObject(Object, IntPtr) may be unavailable in future releases.

Convertit un objet en COM VARIANT.

public:
 static void GetNativeVariantForObject(System::Object ^ obj, IntPtr pDstNativeVariant);
[System.Obsolete("GetNativeVariantForObject(Object, IntPtr) may be unavailable in future releases.")]
[System.Security.SecurityCritical]
public static void GetNativeVariantForObject (object obj, IntPtr pDstNativeVariant);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static void GetNativeVariantForObject (object? obj, IntPtr pDstNativeVariant);
[System.Obsolete("GetNativeVariantForObject(Object, IntPtr) may be unavailable in future releases.")]
public static void GetNativeVariantForObject (object obj, IntPtr pDstNativeVariant);
public static void GetNativeVariantForObject (object? obj, IntPtr pDstNativeVariant);
public static void GetNativeVariantForObject (object obj, IntPtr pDstNativeVariant);
[System.Security.SecurityCritical]
public static void GetNativeVariantForObject (object obj, IntPtr pDstNativeVariant);
[<System.Obsolete("GetNativeVariantForObject(Object, IntPtr) may be unavailable in future releases.")>]
[<System.Security.SecurityCritical>]
static member GetNativeVariantForObject : obj * nativeint -> unit
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member GetNativeVariantForObject : obj * nativeint -> unit
[<System.Obsolete("GetNativeVariantForObject(Object, IntPtr) may be unavailable in future releases.")>]
static member GetNativeVariantForObject : obj * nativeint -> unit
static member GetNativeVariantForObject : obj * nativeint -> unit
[<System.Security.SecurityCritical>]
static member GetNativeVariantForObject : obj * nativeint -> unit
Public Shared Sub GetNativeVariantForObject (obj As Object, pDstNativeVariant As IntPtr)

Paramètres

obj
Object

Objet pour lequel obtenir un VARIANT COM.

pDstNativeVariant
IntPtr

nativeint

Pointeur devant recevoir le VARIANT et qui correspond au paramètre obj.

Attributs

Exceptions

Le paramètre obj est une instance d’un type générique.

Remarques

Le pDstNativeVariant paramètre doit pointer vers suffisamment de mémoire pour stocker le VARIANT résultant. En outre, l’implémentation de cette méthode appelle la fonction VariantInit sur la mémoire brute vers laquelle pointe le pDstNativeVariant paramètre.

S’applique à

GetNativeVariantForObject<T>(T, IntPtr)

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

Attention

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

Convertit un objet d’un type spécifié en COM VARIANT.

public:
generic <typename T>
 static void GetNativeVariantForObject(T obj, IntPtr pDstNativeVariant);
[System.Obsolete("GetNativeVariantForObject<T>(T, IntPtr) may be unavailable in future releases.")]
[System.Security.SecurityCritical]
public static void GetNativeVariantForObject<T> (T obj, IntPtr pDstNativeVariant);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static void GetNativeVariantForObject<T> (T? obj, IntPtr pDstNativeVariant);
[System.Obsolete("GetNativeVariantForObject<T>(T, IntPtr) may be unavailable in future releases.")]
public static void GetNativeVariantForObject<T> (T obj, IntPtr pDstNativeVariant);
public static void GetNativeVariantForObject<T> (T obj, IntPtr pDstNativeVariant);
[System.Security.SecurityCritical]
public static void GetNativeVariantForObject<T> (T obj, IntPtr pDstNativeVariant);
[<System.Obsolete("GetNativeVariantForObject<T>(T, IntPtr) may be unavailable in future releases.")>]
[<System.Security.SecurityCritical>]
static member GetNativeVariantForObject : 'T * nativeint -> unit
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member GetNativeVariantForObject : 'T * nativeint -> unit
[<System.Obsolete("GetNativeVariantForObject<T>(T, IntPtr) may be unavailable in future releases.")>]
static member GetNativeVariantForObject : 'T * nativeint -> unit
static member GetNativeVariantForObject : 'T * nativeint -> unit
[<System.Security.SecurityCritical>]
static member GetNativeVariantForObject : 'T * nativeint -> unit
Public Shared Sub GetNativeVariantForObject(Of T) (obj As T, pDstNativeVariant As IntPtr)

Paramètres de type

T

Type de l’objet à convertir.

Paramètres

obj
T

Objet pour lequel obtenir un VARIANT COM.

pDstNativeVariant
IntPtr

nativeint

Pointeur devant recevoir le VARIANT et qui correspond au paramètre obj.

Attributs

Remarques

Le pDstNativeVariant paramètre doit pointer vers suffisamment de mémoire pour stocker le VARIANT résultant. En outre, l’implémentation de cette méthode appelle la fonction VariantInit sur la mémoire brute vers laquelle pointe le pDstNativeVariant paramètre.

S’applique à