Refreshes information about physical serial ports (or third-party virtual serial ports) and returns their number.
| Visual Basic | Function EnumPhysical() As Long
|
|---|---|
| Delphi | function EnumVirtual(): Integer;
|
| Visual C++ (MFC) | long EnumPhysical();
|
| Visual C++ (#import) | long EnumPhysical();
|
None.
The number of physical serial ports.
The method may throw exception. Use GetLastError method to get the error code.
| ftvspcErrorFailed | 1 | The operation has not been completed. |
|---|---|---|
| ftvspcErrorInvalidParameter | 2 | Invalid parameter. |
To retrieve information about each serial port, use GetPhysical.