Poznámka:
Přístup k této stránce vyžaduje autorizaci. Můžete se zkusit přihlásit nebo změnit adresáře.
Přístup k této stránce vyžaduje autorizaci. Můžete zkusit změnit adresáře.
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
IDebugPortSupplierinterfaces (theIEnumDebugPortSuppliersinterface 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