This function retrieves a list of ports.
[C++Builder] DWORD
IKEnumPorts(LPTSTR Ports);
[Delphi] function
IKEnumPorts(Ports: PChar): DWORD;
Parameters
Name | Explanation |
---|---|
Ports | A string containing the retrieved port names |
Return Value
If NULL (for C++Builder) or nil (for Delphi) 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.
In C++Builder
TCHAR Ports[1024];
In Delphi
Ports: array[0..1023] of Char;
The Ports string will be returned as "xxxxx,xxxxx,xxxxx,¥¥¥¥¥¥¥¥," (delimited by commas and ends with a comma).