Jaa


IDebugPortSupplier2

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

This interface supplies ports to the session debug manager (SDM).

Syntax

IDebugPortSupplier2 : IUnknown

Notes for Implementers

A custom port supplier implements this interface to represent a port supplier.

Notes for Callers

A call to CoCreateInstance with a port supplier's GUID returns this interface (this is the typical way to obtain this interface). For example:

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

A call to GetPortSupplier returns this interface, representing the current port supplier being used by Visual Studio.

  • GetPortSupplier returns this interface, representing the port supplier that created the port.

  • IEnumDebugPortSuppliers2 represents a list of IDebugPortSupplier interfaces (the IEnumDebugPortSuppliers interface is obtained from EnumPortSuppliers, representing all of the port suppliers registered with Visual Studio).

A debug engine typically does not interact with a port supplier.

Methods in Vtable Order

The following table shows the methods of IDebugPortSupplier2.

Method Description
GetPortSupplierName Gets the port supplier name.
GetPortSupplierId Gets the port supplier identifier.
GetPort Gets a port from a port supplier.
EnumPorts Enumerates the ports that already exist.
CanAddPort Verifies that a port supplier supports adding new ports.
AddPort Adds a port.
RemovePort Removes a port.

Remarks

A port supplier can identify itself by name and ID, add and remove ports, and enumerate all ports that the port supplier provides.

Requirements

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See also