Click here to Skip to main content
15,926,144 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Unexplained API Pin
Michael Dunn24-May-07 16:01
sitebuilderMichael Dunn24-May-07 16:01 
QuestionBlocking Certain Keyboard Input Pin
Michael Sadlon24-May-07 13:42
Michael Sadlon24-May-07 13:42 
AnswerRe: Blocking Certain Keyboard Input Pin
Perspx25-May-07 6:34
Perspx25-May-07 6:34 
QuestionAsync Serial Port Read Pin
RMLPilot24-May-07 12:18
RMLPilot24-May-07 12:18 
AnswerRe: Async Serial Port Read Pin
Hans Dietrich24-May-07 13:14
mentorHans Dietrich24-May-07 13:14 
GeneralRe: Async Serial Port Read Pin
RMLPilot25-May-07 2:05
RMLPilot25-May-07 2:05 
GeneralRe: Async Serial Port Read Pin
Hans Dietrich25-May-07 5:34
mentorHans Dietrich25-May-07 5:34 
AnswerRe: Async Serial Port Read Pin
JudyL_MD25-May-07 2:46
JudyL_MD25-May-07 2:46 
How about using async I/O, aka overlapped I/O, to talk to the serial port and, then if your timer expires, cancel the ReadFile using the CancelIo.

One thing to consider is if a partial block of data comes in when your timer expires. What will you do if 500 bytes have come in when your timer expires?

Assuming the source of the data always puts the data onto the serial line in 1400 byte chunks, another idea to consider is to not use a continuous retry loop to read the data. Instead, use the WaitCommEvent function to detect when a byte has been read by the port and then calling the ReadFile to read the 1400 bytes.

Judy
QuestionHelp plz i am Almost next to wall and i will hit my head on it HARD Pin
Immunity1824-May-07 12:00
Immunity1824-May-07 12:00 
AnswerRe: Help plz i am Almost next to wall and i will hit my head on it HARD Pin
Mark Salsbery24-May-07 12:36
Mark Salsbery24-May-07 12:36 
GeneralRe: Help plz i am Almost next to wall and i will hit my head on it HARD Pin
Immunity1824-May-07 12:38
Immunity1824-May-07 12:38 
GeneralRe: Help plz i am Almost next to wall and i will hit my head on it HARD Pin
Immunity1824-May-07 12:40
Immunity1824-May-07 12:40 
GeneralRe: Help plz i am Almost next to wall and i will hit my head on it HARD Pin
Immunity1824-May-07 12:48
Immunity1824-May-07 12:48 
GeneralRe: Help plz i am Almost next to wall and i will hit my head on it HARD Pin
Mark Salsbery24-May-07 12:53
Mark Salsbery24-May-07 12:53 
AnswerRe: Help plz i am Almost next to wall and i will hit my head on it HARD Pin
Michael Dunn24-May-07 14:29
sitebuilderMichael Dunn24-May-07 14:29 
QuestionAfxMessageBox stop working after split the frame Pin
gurucplusplus24-May-07 11:11
gurucplusplus24-May-07 11:11 
AnswerRe: AfxMessageBox stop working after split the frame Pin
Nelek24-May-07 21:33
protectorNelek24-May-07 21:33 
GeneralRe: AfxMessageBox stop working after split the frame Pin
gurucplusplus25-May-07 7:07
gurucplusplus25-May-07 7:07 
GeneralRe: AfxMessageBox stop working after split the frame Pin
Nelek31-May-07 6:11
protectorNelek31-May-07 6:11 
Questionisletter' : not all control paths return a value Pin
Immunity1824-May-07 10:59
Immunity1824-May-07 10:59 
AnswerRe: isletter' : not all control paths return a value Pin
Mark Salsbery24-May-07 11:13
Mark Salsbery24-May-07 11:13 
GeneralRe: isletter' : not all control paths return a value Pin
Immunity1824-May-07 11:17
Immunity1824-May-07 11:17 
GeneralRe: isletter' : not all control paths return a value Pin
Mark Salsbery24-May-07 11:26
Mark Salsbery24-May-07 11:26 
GeneralRe: isletter' : not all control paths return a value Pin
Immunity1824-May-07 11:28
Immunity1824-May-07 11:28 
GeneralRe: isletter' : not all control paths return a value Pin
Mark Salsbery24-May-07 11:32
Mark Salsbery24-May-07 11:32 

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.