ICustomQueryInterface.GetInterface(Guid, IntPtr) 方法

定义

根据指定的接口 ID 返回接口。

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

参数

iid
Guid

请求的接口的 GUID。

ppv
IntPtr

nativeint

此方法返回时,对所请求的接口的引用。

返回

CustomQueryInterfaceResult

枚举值之一,指示是否使用了 IUnknown::QueryInterface 的自定义实现。

属性

注解

应用程序可以使用托管代码为自定义接口和标准运行时接口指定自己的实现。

返回 CustomQueryInterfaceResult 值可用于启用或禁用自定义实现,方法是在 COM 访问期间显示或隐藏特定接口。

此方法对 COM 不可见。

适用于