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 的自訂實作。

屬性

備註

應用程式可以使用 Managed 程式碼,為自訂介面和標準執行時間介面指定自己的實作。

CustomQueryInterfaceResult 回值可用來啟用或停用自訂實作,方法是在 COM 存取期間顯示或隱藏特定介面。

COM 看不到這個方法。

適用於