Can anyone advise me if it is possible to use MSComm to open 2 com port simultaneously. As I have 2 hardware to run by RS232 but currently I can only receive one at the same time using MSComm.
now i am in need of ur help. i can able send a data. through this code., void CSerialView::OnButton1() { // TODO: Add your control notification handler code here UpdateData(TRUE); m_comm.SetOutput(COleVariant(m_output)); } how to receive data without make click in receiving side . where to i placed this code., if (m_comm.GetCommEvent()==2 ) { VARIANT in_dat; in_dat = m_comm.GetInput(); CString strInput(in_dat.bstrVal); m_input = m_input + strInput; UpdateData(FALSE); } if anybody know help me..
Replysdsd
ReplyTry putting two instances of comm control on the same form working on different comm ports may be 1 or 2 . It will work
ReplyIn response to kagay's valid comments the author wrote, "I am sorry for codeguru users if this example doesn't show all the use cases of MScomm control. this article is very simple and it's dedicated for beginner users who need to do sthg in serial communication but I mentionned that users can look for more informations in "COMM98.CHM"." IMO, this is NOT for beginners, because the step-by-step portion of the example does not match what a beginner will see when they attempt to follow along. If your target audience is beginners I feel you have a greater burden to be meticulous in documenting each step. I agree with the other comments as well. This article was not useful, in fact wasted my time. And the editors really need to do a better job vetting submissions.
ReplyThe fact that Visual Studio already have a better example since 1997: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample98/html/_sample_mfc_vcterm.asp Despite the fact that MSDN Dr. Gui already address the debug/release issues for the OCX key registration in 1998, This half done example achieves nothing at all. Does not show how to do NULL in receives, does not correctly identifies all the event constants. What has happened to the codeguru reviewer?
i want to communite using pbx serial port to system whether itis possible how plz send me if any one have
ReplyI am sorry for codeguru users if this example doesn't show all the use cases of MScomm control. this article is very simple and it's dedicated for beginner users who need to do sthg in serial communication but I mentionned that users can look for more informations in "COMM98.CHM".
ReplyI dont believe that this control will work without CDialog, or someother CDialog derived container.
Yes, you can use this control without CFormView or CDialog based apps. See: MSDN KB Article ID: Q151771. The problem is the author is not aware that most issues has been documented by Microsoft long ago!
Reply