Bagikan melalui


Marshal.GetObjectsForNativeVariants Metode

Definisi

Overload

GetObjectsForNativeVariants(IntPtr, Int32)
Kedaluwarsa.

Mengonversi array VARIAN COM menjadi array objek.

GetObjectsForNativeVariants<T>(IntPtr, Int32)
Kedaluwarsa.

Mengonversi array VARIAN COM menjadi array dari jenis tertentu.

GetObjectsForNativeVariants(IntPtr, Int32)

Sumber:
Marshal.NoCom.cs
Sumber:
Marshal.NoCom.cs
Sumber:
Marshal.NoCom.cs

Perhatian

GetObjectsForNativeVariants(IntPtr, Int32) may be unavailable in future releases.

Mengonversi array VARIAN COM menjadi array objek.

public:
 static cli::array <System::Object ^> ^ GetObjectsForNativeVariants(IntPtr aSrcNativeVariant, int cVars);
[System.Obsolete("GetObjectsForNativeVariants(IntPtr, Int32) may be unavailable in future releases.")]
[System.Security.SecurityCritical]
public static object[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static object?[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars);
[System.Obsolete("GetObjectsForNativeVariants(IntPtr, Int32) may be unavailable in future releases.")]
public static object[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars);
public static object?[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars);
public static object[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars);
[System.Security.SecurityCritical]
public static object[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars);
[<System.Obsolete("GetObjectsForNativeVariants(IntPtr, Int32) may be unavailable in future releases.")>]
[<System.Security.SecurityCritical>]
static member GetObjectsForNativeVariants : nativeint * int -> obj[]
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member GetObjectsForNativeVariants : nativeint * int -> obj[]
[<System.Obsolete("GetObjectsForNativeVariants(IntPtr, Int32) may be unavailable in future releases.")>]
static member GetObjectsForNativeVariants : nativeint * int -> obj[]
static member GetObjectsForNativeVariants : nativeint * int -> obj[]
[<System.Security.SecurityCritical>]
static member GetObjectsForNativeVariants : nativeint * int -> obj[]
Public Shared Function GetObjectsForNativeVariants (aSrcNativeVariant As IntPtr, cVars As Integer) As Object()

Parameter

aSrcNativeVariant
IntPtr

nativeint

Penunjuk ke elemen pertama dari array VARIAN COM.

cVars
Int32

Jumlah VARIAN COM di aSrcNativeVariant.

Mengembalikan

Object[]

Array objek yang sesuai dengan aSrcNativeVariant.

Atribut

Pengecualian

cVars adalah angka negatif.

Keterangan

GetObjectsForNativeVariants mengembalikan array objek terkelola yang sesuai dengan penunjuk mentah ke array gaya C dari jenis VARIAN yang tidak dikelola. Interopmarshaler melakukan transformasi yang identik saat mengekspos jenis VARIAN ke kode terkelola. Metode mengembalikan array kosong saat cVars parameter adalah 0.

Array objek (nilai pengembalian) mendapatkan sampah yang dikumpulkan seperti biasa. Array input yang tidak dikelola atau VARIAN individual dalam array input tidak dibebaskan. Oleh karena itu adalah tanggung jawab Anda untuk membebaskan mereka sebagaimana mewajibkannya.

Berlaku untuk

GetObjectsForNativeVariants<T>(IntPtr, Int32)

Sumber:
Marshal.NoCom.cs
Sumber:
Marshal.NoCom.cs
Sumber:
Marshal.NoCom.cs

Perhatian

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

Mengonversi array VARIAN COM menjadi array dari jenis tertentu.

public:
generic <typename T>
 static cli::array <T> ^ GetObjectsForNativeVariants(IntPtr aSrcNativeVariant, int cVars);
[System.Obsolete("GetObjectsForNativeVariants<T>(IntPtr, Int32) may be unavailable in future releases.")]
[System.Security.SecurityCritical]
public static T[] GetObjectsForNativeVariants<T> (IntPtr aSrcNativeVariant, int cVars);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static T[] GetObjectsForNativeVariants<T> (IntPtr aSrcNativeVariant, int cVars);
[System.Obsolete("GetObjectsForNativeVariants<T>(IntPtr, Int32) may be unavailable in future releases.")]
public static T[] GetObjectsForNativeVariants<T> (IntPtr aSrcNativeVariant, int cVars);
public static T[] GetObjectsForNativeVariants<T> (IntPtr aSrcNativeVariant, int cVars);
[System.Security.SecurityCritical]
public static T[] GetObjectsForNativeVariants<T> (IntPtr aSrcNativeVariant, int cVars);
[<System.Obsolete("GetObjectsForNativeVariants<T>(IntPtr, Int32) may be unavailable in future releases.")>]
[<System.Security.SecurityCritical>]
static member GetObjectsForNativeVariants : nativeint * int -> 'T[]
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member GetObjectsForNativeVariants : nativeint * int -> 'T[]
[<System.Obsolete("GetObjectsForNativeVariants<T>(IntPtr, Int32) may be unavailable in future releases.")>]
static member GetObjectsForNativeVariants : nativeint * int -> 'T[]
static member GetObjectsForNativeVariants : nativeint * int -> 'T[]
[<System.Security.SecurityCritical>]
static member GetObjectsForNativeVariants : nativeint * int -> 'T[]
Public Shared Function GetObjectsForNativeVariants(Of T) (aSrcNativeVariant As IntPtr, cVars As Integer) As T()

Jenis parameter

T

Jenis array yang akan dikembalikan.

Parameter

aSrcNativeVariant
IntPtr

nativeint

Penunjuk ke elemen pertama dari array VARIAN COM.

cVars
Int32

Jumlah VARIAN COM di aSrcNativeVariant.

Mengembalikan

T[]

Array T objek yang sesuai dengan aSrcNativeVariant.

Atribut

Pengecualian

cVars adalah angka negatif.

Keterangan

GetObjectsForNativeVariants<T>(IntPtr, Int32) mengembalikan array T yang sesuai dengan penunjuk mentah ke array gaya C dari jenis VARIAN yang tidak dikelola. Interopmarshaler melakukan transformasi yang identik saat mengekspos jenis VARIAN ke kode terkelola. Metode mengembalikan array kosong saat cVars parameter adalah 0.

Array yang dikembalikan dikumpulkan sampah seperti biasa. Array input yang tidak dikelola atau VARIAN individual dalam array input tidak dibebaskan. Oleh karena itu, Anda bertanggung jawab untuk membebaskannya sebagaimana mewajibkannya.

Berlaku untuk