Home > Software engineering >  MSComm control get_Input (), can't read the cache contents
MSComm control get_Input (), can't read the cache contents

Time:09-27

Question background:
I use MFC to write a serial port receives the application, mainly receive GPS information with a computer, GPS by two different pieces of a serial port turn USB board (a FT232 turn a turn is PL2303) test, the results showed that with the FT232 board data reception is normal, but the use of PL2303 board can't receive data,
But, if use serial assistants to simulate, two boards can normal communication,
I am using MSComm control, in the call get_Input (), PL2303 board cannot read cache, single step debugging, found running to oledisp2. The inside of the CPP InvokeHelperV function, the inside of the sc calculation would be different, in this specific function,


Void COleDispatchDriver: : InvokeHelperV (DISPID dwDispID, WORD wFlags,
VARTYPE vtRet, void * pvRet, const BYTE * pbParamInfo, va_list argList)

SCODE sc=m_lpDispatch - & gt; Invoke (dwDispID IID_NULL, 0, wFlags,
& Dispparams pvarResult, & amp; ExcepInfo, & amp; NArgErr);

CodePudding user response:

Control register is normal?
The port is open?
Communication parameter setting is normal?
Port event is normal?
Whether it is right to judge data receive events?

http://blog.csdn.net/hkwlg1314/article/details/48250457

CodePudding user response:

Doubt everything, fight all,
Caution is the ship, ten thousand,
  • Related