View Single Post
Old 01-21-2010, 01:34 PM
Nicknack Nicknack is offline
Senior Member
Join Date: Nov 2006
Location: Germany
Posts: 527

I don't have experience with RS232 , so I can give you only some general tips:
1. are you sure the call has failed, have you tried to check the result with getcommstate?
2. is there any difference if you change the order of your setcommstate calls or if you make all changes in one call?
3. consider the remak section on msdn:
To set only a few members of the DCB structure, you should modify a DCB structure that has been filled in by a call to GetCommState. This ensures that the other members of the DCB structure have appropriate values.

The SetCommState function fails if the XonChar member of the DCB structure is equal to the XoffChar member.
Reply With Quote