ComWrappers.ComInterfaceDispatch.GetInstance<T> 方法

定義

IntPtr 來自所產生的 Vtable,會將其轉換成目標類型。

public:
generic <typename T>
 where T : class static T GetInstance(System::Runtime::InteropServices::ComWrappers::ComInterfaceDispatch* dispatchPtr);
public static T GetInstance<T> (System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch* dispatchPtr) where T : class;
static member GetInstance : nativeptr<System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch> -> 'T (requires 'T : null)

類型參數

T

所需的類型。

參數

dispatchPtr
ComWrappers.ComInterfaceDispatch

Vtable 函式項目的指標。

傳回

T

分派函式呼叫所關聯之執行個體的類別。

適用於