// 把含有两个字符的字符串转换为16进制保存的一字节数据
void CPrivate::GetHexArray_OneByte( CString strTemp, BYTE &hex )
{strTemp.MakeLower();
BYTE highByte = 0;
BYTE lowByte = 0;
// 0x61-0x0a=0x57
if ( strTemp[0] >= 'a' && strTemp[0] <= 'z' )
{
highByte = strTemp[0]-0x57;
}
// 0x61-0x0a=0x57
else if( strTemp[0] >= '0' && strTemp[0] <= '9' )
{
highByte = strTemp[0]-0x30;
}
if ( strTemp[1] >= 'a' && strTemp[1] <= 'z' )
{
lowByte = strTemp[1]-0x57;
}
// 0x61-0x0a=0x57
else if( strTemp[1] >= '0' && strTemp[1] <= '9' )
{
lowByte = strTemp[1]-0x30;
}
highByte = highByte << 4;
highByte |= lowByte;
hex = highByte;
}