Connecting Tech Pros Worldwide Forums | Help | Site Map

Serial communication Receive Problem

Newbie
 
Join Date: May 2007
Posts: 21
#1: Mar 17 '08
Hi all,
I am beginner to VC++, I am trying to transmint and receive data through serial port using MSCOM. I am able to transmit data but I am unable to receive the data

here is my receive code;

void CMscomDlg::OnOnCommMscomm1()
{
// TODO: Add your control notification handler code here
CString msg;
UpdateData();
switch( m_msCom.GetCommEvent()){
case 1: // comEvSend
break;
case 2:// comEvReceive
VARIANT data = m_msCom.GetInput();
msg += (CString)data.bstrVal;
break;
case 3:// comEvCTS
break;
}
m_rx = msg;
UpdateData(false);

}

I checked with both Binary mode as well as Text Mode i does not work in both
Plz some body give heart as soon as possible

Reply