inline DWORD ToDec(CString &strAddr)
{
int nRes = strAddr.Find("x",0);
CString str;
if (nRes != -1)
str = strAddr.Mid(nRes+1);
else
strAddr = "";
int nLength = str.GetLength();
DWORD dValue = 0;
DWORD dSum = 0;
DWORD dTemp = 1;
CString strSample;
for(int i=0; i<nLength; i++)
{
strSample = str.Mid(nLength-1-i, 1);
if(atoi(strSample) > 0)
;
else if("A"==strSample || "a" == strSample)
strSample.Format("10");
else if("B"==strSample || "b" == strSample)
strSample.Format("11");
else if("C"==strSample || "c" == strSample)
strSample.Format("12");
else if("D"==strSample || "d" == strSample)
strSample.Format("13");
else if("E"==strSample || "e" == strSample)
strSample.Format("14");
else if("F"==strSample || "f" == strSample)
strSample.Format("15");
dValue = atoi(strSample);
dValue = dTemp*dValue;
dSum = dSum + dValue;
dTemp = 16*dTemp;
}
return dSum;
}