According to the documentation, the p-string passed to TCPIPConvertIPToHex can optionally contain a port number following the IP address, e.g. "1.2.3.4:80". TCPIPConvertIPToHex is supposed to parse that port number and return it in the cvtPort field of the result record.
In my testing with Marinetti 3.0b9, this doesn't work correctly. The cvtPort field always seems to be 0, even if a non-zero port number was present in the string.
Source file I.Init.S holds the PASC2HEXIP routine that parses the IP address and port.