Share via


NbrPorts Property

The NbrPorts property gets or sets the number of ports on a USB hub.

This property is read/write.

Syntax

HRESULT put_NbrPorts(
  [in]           BYTE bPorts
);

HRESULT get_NbrPorts(
  [out, retval]  BYTE *pbPorts
);

Property Value

The new number of ports for the hub.

Error Codes

NbrPorts returns an HRESULT value.

Remarks

The following VBScript code example shows how to get and set the NbrPorts property.

Dim SoftUSBHub
Set SoftUSBHub = CreateObject("SOFTUSB.SoftUSBHub")

` Get the NbrPorts property
Dim NoPorts
NoPorts = SoftUSBHub.NbrPorts

`If the number of ports is not 8, set the number of ports to 8
If NoPorts <> 8 Then
 SoftUSBHub.NbrPorts = 8
End If

Requirements

Header

SoftUSBif.h

See Also

ISoftUSBHub

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010