CString GetIPStringFromDWORD(DWORD IP)
{
CString strA(_T("")), strB(_T("")), strC(_T("")), strD(_T(""));
DWORD dwIP = IP;
strD.Format(_T(".%d"), dwIP % 256);
dwIP /= 256;
strC.Format(_T(".%d"), dwIP % 256);
dwIP /= 256;
strB.Format(_T(".%d"), dwIP % 256);
dwIP /= 256;
strA.Format(_T("%d"), dwIP % 256);
return strA + strB + strC + strD;
}
{
CString strA(_T("")), strB(_T("")), strC(_T("")), strD(_T(""));
DWORD dwIP = IP;
strD.Format(_T(".%d"), dwIP % 256);
dwIP /= 256;
strC.Format(_T(".%d"), dwIP % 256);
dwIP /= 256;
strB.Format(_T(".%d"), dwIP % 256);
dwIP /= 256;
strA.Format(_T("%d"), dwIP % 256);
return strA + strB + strC + strD;
}