Marshal.GetEndComSlot(Type) 方法

定义

检索向 COM 公开时某个类型的虚拟功能表(v 表或 VTBL)中的最后一个槽。

public:
 static int GetEndComSlot(Type ^ t);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static int GetEndComSlot (Type t);
public static int GetEndComSlot (Type t);
[System.Security.SecurityCritical]
public static int GetEndComSlot (Type t);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member GetEndComSlot : Type -> int
static member GetEndComSlot : Type -> int
[<System.Security.SecurityCritical>]
static member GetEndComSlot : Type -> int
Public Shared Function GetEndComSlot (t As Type) As Integer

参数

t
Type

表示接口或类的类型。

返回

Int32

向 COM 公开时接口的最后一个 VTBL 槽。 如果 t 参数是一个类,则返回的 VTBL 槽是从该类生成的接口中的最后一个槽。

属性

注解

此方法返回接口或类的从零开始的 v 表编号。 在类上使用时,返回的槽号是指类的类接口。 如果类接口是自动调度的,此方法始终返回 -1 以指示仅调度接口不会向托管客户端公开 v 表。 可以在指定范围内使用 GetEndComSlotMarshal.GetStartComSlot 结合 Marshal.GetMethodInfoForComSlot 来传递槽。 有关详细信息,请参阅 类接口简介

适用于

另请参阅