Udostępnij za pośrednictwem


Marshal.GetNativeVariantForObject Metoda

Definicja

Przeciążenia

GetNativeVariantForObject(Object, IntPtr)
Przestarzałe.

Konwertuje obiekt na WARIANT MODELU COM.

GetNativeVariantForObject<T>(T, IntPtr)
Przestarzałe.

Konwertuje obiekt określonego typu na WARIANT MODELU COM.

GetNativeVariantForObject(Object, IntPtr)

Źródło:
Marshal.NoCom.cs
Źródło:
Marshal.NoCom.cs
Źródło:
Marshal.NoCom.cs

Przestroga

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

Konwertuje obiekt na WARIANT MODELU COM.

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

Obiekt, dla którego ma być uzyskiwany WARIANT MODELU COM.

pDstNativeVariant
IntPtr

nativeint

Wskaźnik odbierający wariant odpowiadający parametrowi obj .

Atrybuty

Wyjątki

Parametr obj jest wystąpieniem typu ogólnego.

Uwagi

Parametr pDstNativeVariant musi wskazywać wystarczającą ilość pamięci do przechowywania wynikowego wariantu. Ponadto implementacja tej metody wywołuje funkcję VariantInit w pamięci pierwotnej wskazywanej przez pDstNativeVariant parametr .

Dotyczy

GetNativeVariantForObject<T>(T, IntPtr)

Źródło:
Marshal.NoCom.cs
Źródło:
Marshal.NoCom.cs
Źródło:
Marshal.NoCom.cs

Przestroga

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

Konwertuje obiekt określonego typu na WARIANT MODELU COM.

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 obiektu do przekonwertowania.

Parametry

obj
T

Obiekt, dla którego ma być uzyskiwany WARIANT MODELU COM.

pDstNativeVariant
IntPtr

nativeint

Wskaźnik odbierający wariant odpowiadający parametrowi obj .

Atrybuty

Uwagi

Parametr pDstNativeVariant musi wskazywać wystarczającą ilość pamięci do przechowywania wynikowego wariantu. Ponadto implementacja tej metody wywołuje funkcję VariantInit w pamięci pierwotnej wskazywanej przez pDstNativeVariant parametr .

Dotyczy