MFC Socket Serialization truncated my raw data.
I am using MFC Serialization to receive some raw data. However, it always deleted my data from 0x00 byte. I just observed the memory and found the raw data received. But the MFC Serialization "ar" processed data into character string. How do I change it back to raw data ?
m_strText is one member of CMsg that is a CString class.
void CMsg::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
ar << (WORD)m_bClose;
ar << m_strText;
}
else
{
WORD wd;
ar >> wd;
m_bClose = (BOOL)wd;
ar >> m_strText;
}
m_msgList.Serialize(ar);
}
[679 byte] By [
crawler] at [2007-11-19 19:41:35]
