ICustomQueryInterface.GetInterface(Guid, IntPtr) Méthode

Définition

Retourne une interface en fonction de l'ID d'interface spécifié.

public:
 System::Runtime::InteropServices::CustomQueryInterfaceResult GetInterface(Guid % iid, [Runtime::InteropServices::Out] IntPtr % ppv);
[System.Security.SecurityCritical]
public System.Runtime.InteropServices.CustomQueryInterfaceResult GetInterface (ref Guid iid, out IntPtr ppv);
public System.Runtime.InteropServices.CustomQueryInterfaceResult GetInterface (ref Guid iid, out IntPtr ppv);
[<System.Security.SecurityCritical>]
abstract member GetInterface : Guid * nativeint -> System.Runtime.InteropServices.CustomQueryInterfaceResult
abstract member GetInterface : Guid * nativeint -> System.Runtime.InteropServices.CustomQueryInterfaceResult
Public Function GetInterface (ByRef iid As Guid, ByRef ppv As IntPtr) As CustomQueryInterfaceResult

Paramètres

iid
Guid

GUID de l'interface demandée.

ppv
IntPtr

nativeint

Référence à l'interface demandée, lorsque cette méthode est retournée.

Retours

CustomQueryInterfaceResult

Une des valeurs d’énumération qui indique si une implémentation personnalisée de IUnknown::QueryInterface a été utilisée.

Attributs

Remarques

Une application peut utiliser du code managé pour spécifier sa propre implémentation pour les interfaces personnalisées et les interfaces runtime standard.

La CustomQueryInterfaceResult valeur de retour peut être utilisée pour activer ou désactiver des implémentations personnalisées en affichant ou en masquant des interfaces spécifiques pendant l’accès COM.

Cette méthode est invisible pour COM.

S’applique à