I want to know the IP address of the other system that my winsock is connected to. RemoteHost and RemoteHostIP only are long value while I need a value in IP address format.
Printable View
I want to know the IP address of the other system that my winsock is connected to. RemoteHost and RemoteHostIP only are long value while I need a value in IP address format.
IP address format? 255.255.255.255? RemoteHostIP returns that kind of format.
Are you using VB6?
Yes VB6
I thought so too.
Quote:
Originally Posted by Kurdistan
A VB6 long would be a four byte value. An IP address is four bytes. I suspect you are getting the IP address as you expect, it just needs to get converted into something. Do you want to actually see the string: Byte1 period byte2 period byte3 period byte4?