Compartir a través de


Marshal.GetNativeVariantForObject Método

Definición

Sobrecargas

GetNativeVariantForObject(Object, IntPtr)
Obsoletos.

Convierte un objeto en un COM VARIANT.

GetNativeVariantForObject<T>(T, IntPtr)
Obsoletos.

Convierte un objeto de un tipo especificado en un objeto COM VARIANT.

GetNativeVariantForObject(Object, IntPtr)

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

Precaución

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

Convierte un objeto en un 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)

Parámetros

obj
Object

Objeto para el que se va a obtener un tipo COM VARIANT.

pDstNativeVariant
IntPtr

nativeint

Puntero para recibir el VARIANT correspondiente al parámetro obj.

Atributos

Excepciones

El parámetro obj es una instancia de un tipo genérico.

Comentarios

El pDstNativeVariant parámetro debe apuntar a suficiente memoria para almacenar el VALOR VARIANT resultante. Además, la implementación de este método llama a la función VariantInit en la memoria sin procesar a la que apunta el pDstNativeVariant parámetro.

Se aplica a

GetNativeVariantForObject<T>(T, IntPtr)

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

Precaución

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

Convierte un objeto de un tipo especificado en un objeto 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)

Parámetros de tipo

T

Tipo del objeto que se va a convertir.

Parámetros

obj
T

Objeto para el que se va a obtener un tipo COM VARIANT.

pDstNativeVariant
IntPtr

nativeint

Puntero para recibir el VARIANT correspondiente al parámetro obj.

Atributos

Comentarios

El pDstNativeVariant parámetro debe apuntar a suficiente memoria para almacenar el VALOR VARIANT resultante. Además, la implementación de este método llama a la función VariantInit en la memoria sin procesar a la que apunta el pDstNativeVariant parámetro.

Se aplica a