此接口会议的端口提供调试管理器 (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方法。
方法 |
说明 |
---|---|
获取端口提供程序名称。 |
|
获取端口提供程序标识符。 |
|
从端口提供程序获取端口。 |
|
枚举已存在的端口。 |
|
验证端口提供程序支持添加新端口。 |
|
添加一个端口。 |
|
移除端口。 |
备注
端口提供程序可以按名称标识自身和 ID,添加和移除端口和枚举端口提供程序提供的任何端口。
要求
标题:msdbg.h
命名空间:Microsoft.VisualStudio.Debugger.Interop
程序集:Microsoft.VisualStudio.Debugger.Interop.dll
请参见
参考
IDebugCoreServer2:: GetPortSupplier