ComWrappers.ComInterfaceDispatch.GetInstance<T> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
給定一個 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
與派遣函式呼叫相關聯的型別實例。