Share via


IDebugPortSupplier2::CanAddPort

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

Verifies that a port supplier can add new ports.

Syntax

HRESULT CanAddPort( 
   void 
);
int CanAddPort();

Return Value

If the port can be added, returns S_OK; otherwise, returns S_FALSE to indicate no ports can be added to this port supplier.

Remarks

Call this method before calling the AddPort method since the latter method creates the port as well as adding it, which could be a time-consuming operation.

See also