Click here to Skip to main content
15,882,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone,

I am not writing everything again here, because lot more depth is discussed at link below.

Please help.
Rage 10-Mar-14 9:08am    
Is your handle valid ?
Some stabs in the dark
Have you open the stream with GENERIC_ALL ?
Have you tried reading without writing before (configure your hw to poll out values) ?

Try turning on the DTR pin. The device may ignore input when that pin is inactive.
Share this answer
Hi Guys,

Issue is solved. I had to add wait till InQueue > 0 (it means there is atleast 1 byte in receive buffer) or timeout (as safety exit) is over. it would be blocking call but it is OK for my application at the moment. waitComm() did not work well for me here.

sample snippet:

        ClearCommError((HANDLE)*h_drv, (LPDWORD)&Err, &CST);

        if((CST.cbInQue >0)||(count >1000000))

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900