Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This interface supplies ports to the session debug manager (SDM).
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 IDebugCoreServer2::GetPortSupplier returns this interface, representing the current port supplier being used by Visual Studio.
IDebugPort2::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 IDebugCoreServer2::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 |
---|---|
Gets the port supplier name. |
|
Gets the port supplier identifier. |
|
Gets a port from a port supplier. |
|
Enumerates the ports that already exist. |
|
Verifies that a port supplier supports adding new ports. |
|
Adds a port. |
|
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
Reference
IDebugCoreServer2::GetPortSupplier