Marshal.GetObjectForNativeVariant Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Sobrecargas
GetObjectForNativeVariant(IntPtr) |
Obsoletos.
Convierte un COM VARIANT a un objeto. |
GetObjectForNativeVariant<T>(IntPtr) |
Obsoletos.
Convierte un objeto COM VARIANT en un objeto de un tipo especificado. |
GetObjectForNativeVariant(IntPtr)
- Source:
- Marshal.NoCom.cs
- Source:
- Marshal.NoCom.cs
- Source:
- Marshal.NoCom.cs
Precaución
GetObjectForNativeVariant(IntPtr) may be unavailable in future releases.
Convierte un COM VARIANT a un objeto.
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
Parámetros
- pSrcNativeVariant
-
IntPtr
nativeint
Puntero a un tipo de datos VARIANT COM.
Devoluciones
Objeto que corresponde al parámetro pSrcNativeVariant
.
- Atributos
Excepciones
pSrcNativeVariant
no es un tipo VARIANT válido.
pSrcNativeVariant
tiene un tipo incompatible.
Comentarios
GetObjectForNativeVariant devuelve un objeto administrado que corresponde a un puntero sin procesar a un tipo VARIANT no administrado. El interopmarshaler realiza la transformación idéntica al exponer un tipo VARIANT al código administrado.
GetObjectForNativeVariant proporciona la funcionalidad opuesta de Marshal.GetNativeVariantForObject.
Cuando se VT_ERROR el tipo VARIANT, GetObjectForNativeVariant devuelve un objeto de tipo Int32
en lugar de UInt32
.
Consulte también
Se aplica a
GetObjectForNativeVariant<T>(IntPtr)
- Source:
- Marshal.NoCom.cs
- Source:
- Marshal.NoCom.cs
- Source:
- Marshal.NoCom.cs
Precaución
GetObjectForNativeVariant<T>(IntPtr) may be unavailable in future releases.
Convierte un objeto COM VARIANT en un objeto de un tipo especificado.
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
Parámetros de tipo
- T
Tipo al que se va a convertir el COM VARIANT.
Parámetros
- pSrcNativeVariant
-
IntPtr
nativeint
Puntero a un tipo de datos VARIANT COM.
Devoluciones
Objeto del tipo especificado que corresponde al parámetro pSrcNativeVariant
.
- Atributos
Excepciones
pSrcNativeVariant
no es un tipo VARIANT válido.
pSrcNativeVariant
tiene un tipo incompatible.
Comentarios
GetObjectForNativeVariant<T>(IntPtr) devuelve un objeto administrado de tipo T
que corresponde a un puntero sin procesar a un tipo VARIANT no administrado. El interopmarshaler realiza la transformación idéntica al exponer un tipo VARIANT al código administrado.
GetObjectForNativeVariant<T>(IntPtr) proporciona la funcionalidad opuesta de GetNativeVariantForObject<T>(T, IntPtr).