See the sample below, maybe useful: http://www.codeguru.com/network/RasClient.shtml
See the links below, useful: http://www.codeproject.com/useritems/tserial_event.asp http://www.codeproject.com/useritems/CheckRASandModem.asp http://www.codeproject.com/useritems/rras.asp
CString str;
str="ATS0=1";
str.Format("%s",str);
m_hScom.SetOutput((COleVariant(str));
捕获串口接收到字符串的事件
当连接成功后发送数据
CString str1;
str1="LOGIN 01";
m_hScom.SetOutoput((ColeVariant(str1));
此时在接受端就收到了一个NO字符串
http://www.codeproject.com/useritems/CheckRASandModem.asp
http://www.codeproject.com/useritems/rras.asp
//Q0/Q1modem返回/不返回结果码;M0/M1关闭/打开MODEM扬声器,
注意回车府的添加即可。