Marshal.GetTypeForITypeInfo(IntPtr) 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.
public:
static Type ^ GetTypeForITypeInfo(IntPtr piTypeInfo);
public static Type GetTypeForITypeInfo(IntPtr piTypeInfo);
[System.Security.SecurityCritical]
public static Type GetTypeForITypeInfo(IntPtr piTypeInfo);
static member GetTypeForITypeInfo : nativeint -> Type
[<System.Security.SecurityCritical>]
static member GetTypeForITypeInfo : nativeint -> Type
Public Shared Function GetTypeForITypeInfo (piTypeInfo As IntPtr) As Type
Paramètres
- piTypeInfo
-
IntPtr
nativeint
Interface ITypeInfo à marshaler.
Retours
Type managé qui représente l’objet non managé ITypeInfo .
- Attributs
Remarques
GetTypeForITypeInfo retourne une System.Type instance basée sur le type d’origine. Vous pouvez appliquer le System.Runtime.InteropServices.MarshalAsAttribute comportement de marshaling d’interopérabilité standard à ce marshaleur personnalisé.
L’outilTlbimp.exe (Importateur de bibliothèque de types) utilise le marshaleur personnalisé pour traduire ITypeInfo les paramètres en System.Type paramètres. Toutefois, si vous obtenez une interface d’un ITypeInfo moyen autre que Tlbimp.exe, vous pouvez utiliser GetTypeForITypeInfo pour effectuer manuellement la même traduction.