Marshal.GetObjectsForNativeVariants Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
| Nom | Description |
|---|---|
| GetObjectsForNativeVariants(IntPtr, Int32) |
Obsolète.
Convertit un tableau de VARIANT COM en tableau d’objets. |
| GetObjectsForNativeVariants<T>(IntPtr, Int32) |
Obsolète.
Convertit un tableau de VARIANT COM en tableau d’un type spécifié. |
GetObjectsForNativeVariants(IntPtr, Int32)
- Source:
- Marshal.NoCom.cs
- Source:
- Marshal.NoCom.cs
- Source:
- Marshal.NoCom.cs
- Source:
- Marshal.NoCom.cs
- Source:
- Marshal.NoCom.cs
Attention
GetObjectsForNativeVariants(IntPtr, Int32) may be unavailable in future releases.
Convertit un tableau de VARIANT COM en tableau d’objets.
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()
Paramètres
- aSrcNativeVariant
-
IntPtr
nativeint
Pointeur vers le premier élément d’un tableau de VARIANTs COM.
- cVars
- Int32
Nombre de VARIANT COM en aSrcNativeVariant.
Retours
Tableau d’objets qui correspond à aSrcNativeVariant.
- Attributs
Exceptions
cVars est un nombre négatif.
Remarques
GetObjectsForNativeVariants retourne un tableau d’objets managés qui correspond à un pointeur brut vers un tableau de type C de types VARIANT non managés. L’interopmarshaler effectue la transformation identique lors de l’exposition d’un type VARIANT au code managé. La méthode retourne un tableau vide lorsque le cVars paramètre est 0.
Le tableau d’objets (la valeur de retour) obtient le garbage collected comme d’habitude. Le tableau d’entrée non managé ou les VARIANT individuels dans le tableau d’entrée ne sont pas libérés. Par conséquent, il vous incombe de les libérer selon les besoins.
S’applique à
GetObjectsForNativeVariants<T>(IntPtr, Int32)
- Source:
- Marshal.NoCom.cs
- Source:
- Marshal.NoCom.cs
- Source:
- Marshal.NoCom.cs
- Source:
- Marshal.NoCom.cs
- Source:
- Marshal.NoCom.cs
Attention
GetObjectsForNativeVariants<T>(IntPtr, Int32) may be unavailable in future releases.
Convertit un tableau de VARIANT COM en tableau d’un type spécifié.
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()
Paramètres de type
- T
Type du tableau à retourner.
Paramètres
- aSrcNativeVariant
-
IntPtr
nativeint
Pointeur vers le premier élément d’un tableau de VARIANTs COM.
- cVars
- Int32
Nombre de VARIANT COM en aSrcNativeVariant.
Retours
Tableau d’objets T correspondant à aSrcNativeVariant.
- Attributs
Exceptions
cVars est un nombre négatif.
Remarques
GetObjectsForNativeVariants<T>(IntPtr, Int32) retourne un tableau de T ce qui correspond à un pointeur brut vers un tableau de style C de types VARIANT non managés. L’interopmarshaler effectue la transformation identique lors de l’exposition d’un type VARIANT au code managé. La méthode retourne un tableau vide lorsque le cVars paramètre est 0.
Le tableau retourné est collecté comme d’habitude. Le tableau d’entrée non managé ou les VARIANT individuels dans le tableau d’entrée ne sont pas libérés. Par conséquent, il est de votre responsabilité de les libérer selon les besoins.