This function retrieves a list of ports.
[C++Builder/Visual
C++] DWORD IKEnumPorts(LPTSTR
Ports);
[Delphi] function
IKEnumPorts(Ports: PChar): DWORD;
[Visual Basic] Function
IKEnumPorts(ByVal Ports As String) As Long
Parameters
Name | Explanation |
---|---|
Ports | A string containing the retrieved port names |
Return Value
If NULL (for C++Builder and Visual C++), nil (for Delphi), and vbNullString (for Visual Basic) are set into Ports, the required size of the string is returned when the port name is retrieved (does not included the final null). In the Ansi versions the returned value is the number of bytes. In the Unicode versions, the return value is the number of characters.
Explanation
The IKEnumPorts function retrieves a list of ports.
(1)C++Builder/Visual C++
TCHAR Ports[1024];
(2)Delphi
Ports: array[0..1023] of Char;
(3)Visual Basic
Dim Ports As String * 1024
The Ports string will be returned as "xxxxx,xxxxx,xxxxx,¥¥¥¥¥¥¥¥," (delimited by commas and ends with a comma).