am I need to add another "Microsoft Communication Control" (as shown in the picture) or not?
Showing in the picture is what I already did and I already add another comm port initialization as suggested above. when I compile the program, everything is o.k. But when I try to execute the program, nothing happen (the program doesn't executed). Anybody know what is wrong?
for Serial port initialize I do this:
// TODO: Add extra initialization here
m_mscomm.SetCommPort (4);
m_mscomm.SetSettings ("9600,n,8,1");
m_mscomm.SetPortOpen (TRUE);
myVar = m_mscomm.GetInput ();
data = myVar.bstrVal ;
m_rx = m_rx + data;
UpdateData(FALSE);
}
And if there Comm Event in port5, I do this:
void CBasicmodemDlg::OnOnCommMscomm2()
{
// TODO: Add your control notification handler code here
if (m_mscomm2.GetCommEvent()==2)
{
VARIANT in_dat;
in_dat = m_mscomm2.GetInput();
CString strInput(in_dat.bstrVal);
m_tx = m_tx + strInput;
UpdateData(FALSE);
}