Share via


ComWrappers.ComputeVtables(Object, CreateComInterfaceFlags, Int32) 方法

定義

計算 obj 所需的 Vtable,並參考 flags 的值。

protected:
 abstract System::Runtime::InteropServices::ComWrappers::ComInterfaceEntry* ComputeVtables(System::Object ^ obj, System::Runtime::InteropServices::CreateComInterfaceFlags flags, [Runtime::InteropServices::Out] int % count);
protected abstract System.Runtime.InteropServices.ComWrappers.ComInterfaceEntry* ComputeVtables (object obj, System.Runtime.InteropServices.CreateComInterfaceFlags flags, out int count);
abstract member ComputeVtables : obj * System.Runtime.InteropServices.CreateComInterfaceFlags * int -> nativeptr<System.Runtime.InteropServices.ComWrappers.ComInterfaceEntry>

參數

obj
Object

傳回之 Vtables 的目標。

flags
CreateComInterfaceFlags

用以計算 Vtable 的旗標。

count
Int32

傳回之記憶體中包含的項目數。

傳回

ComWrappers.ComInterfaceEntry 指標,包含所有 COM 介面項目的記憶體。

備註

從此函式傳回的所有記憶體都必須是 Unmanaged 記憶體或釘選的 Managed 記憶體,或已使用 AllocateTypeAssociatedMemory(Type, Int32) API 配置。

如果無法建立介面專案,而且傳回負 count 數或 null 且傳回非零 count ,呼叫 GetOrCreateComInterfaceForObject(Object, CreateComInterfaceFlags) 將會擲 ArgumentException回 。

適用於