CString ChangeIP (Char * IP)
{
// convert the IP address from 4.3.2.1 into 1.2.3.4
Const char * s = "."
Char * tempip = new char [20];
STRCPY (TEMPIP, IP);
Char * ip1;
Char * ip2;
Char * IP3;
Char * IP4;
CSTRING RTNIP;
IP1 = STRTOK (Tempip, s);
IP2 = STRTOK (NULL, S);
IP3 = STRTOK (NULL, S);
IP4 = STRTOK (NULL, S);
Rtnip.format ("% s.% S.% S.% S", IP4, IP3, IP2, IP1);
Return RTNIP;
}
In fact, there is a function of related implementation in the Win32 API, but when the brain is hot, I wrote one. I found it afterwards, huh, huh, take it out, just is a tip.