Sdílet prostřednictvím


Marshal.GetNativeVariantForObject Metoda

Definice

Přetížení

GetNativeVariantForObject(Object, IntPtr)
Zastaralé.

Převede objekt na COM VARIANT.

GetNativeVariantForObject<T>(T, IntPtr)
Zastaralé.

Převede objekt zadaného typu na COM VARIANT.

GetNativeVariantForObject(Object, IntPtr)

Zdroj:
Marshal.NoCom.cs
Zdroj:
Marshal.NoCom.cs
Zdroj:
Marshal.NoCom.cs

Upozornění

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

Převede objekt na 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)

Parametry

obj
Object

Objekt, pro který chcete získat COM VARIANT.

pDstNativeVariant
IntPtr

nativeint

Ukazatel pro příjem varianty, který odpovídá parametru obj .

Atributy

Výjimky

Parametr obj je instance obecného typu.

Poznámky

Parametr pDstNativeVariant musí odkazovat na dostatek paměti pro uložení výsledné varianty. Implementace této metody také volá funkci VariantInit na nezpracované paměti, na pDstNativeVariant kterou parametr odkazuje.

Platí pro

GetNativeVariantForObject<T>(T, IntPtr)

Zdroj:
Marshal.NoCom.cs
Zdroj:
Marshal.NoCom.cs
Zdroj:
Marshal.NoCom.cs

Upozornění

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

Převede objekt zadaného typu na 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)

Parametry typu

T

Typ objektu, který se má převést.

Parametry

obj
T

Objekt, pro který chcete získat COM VARIANT.

pDstNativeVariant
IntPtr

nativeint

Ukazatel pro příjem varianty, který odpovídá parametru obj .

Atributy

Poznámky

Parametr pDstNativeVariant musí odkazovat na dostatek paměti pro uložení výsledné varianty. Implementace této metody také volá funkci VariantInit v nezpracované paměti, na pDstNativeVariant kterou parametr odkazuje.

Platí pro