I have been trying to receive raw bytes on serial port using MScomm with visual C++6.0 but I don't know how to get the decimal or hex value from the function getInput(). I can get the string out of the function but then it becomes a character. For example if I receive 0x35, it becomes 5. Here is part of the code
if (m_comm.GetCommEvent()==2 )
{
VARIANT in_dat;
in_dat = m_comm.GetInput();
CString strInput(in_dat.bstrVal);
m_edit2 = strInput;// + m_edit2;
UpdateData(FALSE);
}
Can somebody help me with this please?
if (m_comm.GetCommEvent()==2 )
{
VARIANT in_dat;
in_dat = m_comm.GetInput();
CString strInput(in_dat.bstrVal);
m_edit2 = strInput;// + m_edit2;
UpdateData(FALSE);
}
Can somebody help me with this please?