IDebugPortSupplier2

此接口会议的端口提供调试管理器 (SDM)。

IDebugPortSupplier2 : IUnknown

实现者说明

自定义端口提供程序实现此接口表示端口提供程序。

调用方的说明

CoCreateInstance 的调用和端口提供程序的 GUID 返回此接口 (这是典型方式获取此接口)。 例如:

IDebugPortSupplier2 *GetPortSupplier(GUID *pPortSupplierGuid)
{
    IDebugPortSupplier2 *pPS = NULL;
    if (pPortSupplierGuid != NULL) {
        CComPtr<IDebugPortSupplier2> spPortSupplier;
        spPortSupplier.CoCreateInstance(*pPortSupplierGuid);
        if (spPortSupplier != NULL) {
            pPS = spPortSupplier.Detach();
        }
    }
    return (pPS);
}

IDebugCoreServer2:: GetPortSupplier 的调用返回此接口,表示 Visual Studio当前使用的端口提供程序。

IDebugPort2:: GetPortSupplier 返回此接口,表示创建的端口提供程序。

IEnumDebugPortSuppliers2 表示 IDebugPortSupplier 接口列表 ( IEnumDebugPortSuppliers 接口从 IDebugCoreServer2:: EnumPortSuppliers获取,表示任何端口提供程序注册用 Visual Studio)。

调试引擎与端口提供程序通常不进行交互。

方法按 Vtable 顺序

下表显示 IDebugPortSupplier2方法。

方法

说明

IDebugPortSupplier2:: GetPortSupplierName

获取端口提供程序名称。

IDebugPortSupplier2:: GetPortSupplierId

获取端口提供程序标识符。

IDebugPortSupplier2:: GetPort

从端口提供程序获取端口。

IDebugPortSupplier2:: EnumPorts

枚举已存在的端口。

IDebugPortSupplier2:: CanAddPort

验证端口提供程序支持添加新端口。

IDebugPortSupplier2:: AddPort

添加一个端口。

IDebugPortSupplier2:: RemovePort

移除端口。

备注

端口提供程序可以按名称标识自身和 ID,添加和移除端口和枚举端口提供程序提供的任何端口。

要求

标题:msdbg.h

命名空间:Microsoft.VisualStudio.Debugger.Interop

程序集:Microsoft.VisualStudio.Debugger.Interop.dll

请参见

参考

IDebugPort2:: GetPortSupplier

IDebugCoreServer2:: GetPortSupplier

IEnumDebugPortSuppliers2

概念

核心接口