Click here to Skip to main content
16,010,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: How to clear buffer of a COM port ? Pin
VC++Maniac10-Dec-08 23:30
VC++Maniac10-Dec-08 23:30 
AnswerRe: How to clear buffer of a COM port ? Pin
Roger Stoltz10-Dec-08 23:40
Roger Stoltz10-Dec-08 23:40 
GeneralRe: How to clear buffer of a COM port ? Pin
kapardhi11-Dec-08 1:17
kapardhi11-Dec-08 1:17 
GeneralRe: How to clear buffer of a COM port ? Pin
Roger Stoltz11-Dec-08 2:09
Roger Stoltz11-Dec-08 2:09 
GeneralRe: How to clear buffer of a COM port ? Pin
kapardhi11-Dec-08 2:25
kapardhi11-Dec-08 2:25 
QuestionRe: How to clear buffer of a COM port ? Pin
Roger Stoltz11-Dec-08 3:01
Roger Stoltz11-Dec-08 3:01 
AnswerRe: How to clear buffer of a COM port ? Pin
Iain Clarke, Warrior Programmer11-Dec-08 0:13
Iain Clarke, Warrior Programmer11-Dec-08 0:13 
GeneralRe: How to clear buffer of a COM port ? Pin
kapardhi11-Dec-08 1:18
kapardhi11-Dec-08 1:18 
To be more specific :
The context where i want to clear buffer is somewhat as follows :
The device which is attached to the COM port is sujected to a specific Baudrate, parity, databit and stopbit, whose values i do not know beforehand. so i send the command for all combinations of baudrate, parity, databit stopbits.
During the process i receive junk/unnecessary response for a wrong combination, and i get correct/ expected response only for correct combination of baudrate, parity, databibit and stopbit.
so i want only to read the correct response and ignore others !
I know correct value starts with a specific value, so when ever there is a response starting with the specific value, I read it else I ignore it.
Now for the responses which I get for wrong combination donot start with a specific value so I ignore them hence they get accumulated in the buffer, now when the correct combination is reached and I try to read the response it starts with previous junk values as this response doesnot start with my specific value so it gets ignored in way I lose my correct response also, so I want to clear the buffer befor I send my command.
Thanks !
AnswerRe: How to clear buffer of a COM port ? Pin
JudyL_MD11-Dec-08 8:07
JudyL_MD11-Dec-08 8:07 
QuestionRe: How to clear buffer of a COM port ? Pin
kapardhi11-Dec-08 19:41
kapardhi11-Dec-08 19:41 
AnswerRe: How to clear buffer of a COM port ? Pin
JudyL_MD12-Dec-08 3:14
JudyL_MD12-Dec-08 3:14 
QuestionHow to create .DBX file (MS-OUTLOOK EXPRESS files) using vc++ 6.0 Pin
ravi malik10-Dec-08 19:44
ravi malik10-Dec-08 19:44 
QuestionCreate DIB from a HBITMAP Pin
VC++Maniac10-Dec-08 19:35
VC++Maniac10-Dec-08 19:35 
AnswerRe: Create DIB from a HBITMAP Pin
Hamid_RT10-Dec-08 20:17
Hamid_RT10-Dec-08 20:17 
QuestionRe: Create DIB from a HBITMAP Pin
VC++Maniac10-Dec-08 20:25
VC++Maniac10-Dec-08 20:25 
AnswerRe: Create DIB from a HBITMAP Pin
enhzflep10-Dec-08 23:34
enhzflep10-Dec-08 23:34 
GeneralRe: Create DIB from a HBITMAP Pin
VC++Maniac10-Dec-08 23:43
VC++Maniac10-Dec-08 23:43 
GeneralRe: Create DIB from a HBITMAP Pin
akirilov11-Dec-08 0:08
akirilov11-Dec-08 0:08 
GeneralRe: Create DIB from a HBITMAP Pin
enhzflep11-Dec-08 0:11
enhzflep11-Dec-08 0:11 
GeneralRe: Create DIB from a HBITMAP Pin
VC++Maniac11-Dec-08 0:25
VC++Maniac11-Dec-08 0:25 
AnswerRe: Create DIB from a HBITMAP Pin
Mark Salsbery11-Dec-08 7:08
Mark Salsbery11-Dec-08 7:08 
QuestionRe: Create DIB from a HBITMAP Pin
VC++Maniac14-Dec-08 17:42
VC++Maniac14-Dec-08 17:42 
AnswerRe: Create DIB from a HBITMAP Pin
Mark Salsbery15-Dec-08 7:51
Mark Salsbery15-Dec-08 7:51 
AnswerRe: Create DIB from a HBITMAP Pin
PJ Arends11-Dec-08 15:11
professionalPJ Arends11-Dec-08 15:11 
QuestionMost complete Implementation of C++ specification Pin
ComplexLifeForm10-Dec-08 19:15
ComplexLifeForm10-Dec-08 19:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.