Click here to Skip to main content
15,889,909 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: QueueUserWorkItem API Pin
David Crow5-Apr-05 3:07
David Crow5-Apr-05 3:07 
GeneralRe: QueueUserWorkItem API Pin
Dudi Avramov5-Apr-05 20:51
Dudi Avramov5-Apr-05 20:51 
GeneralRead and parse XML file from internet Pin
doctorpi4-Apr-05 21:37
doctorpi4-Apr-05 21:37 
GeneralRe: Read and parse XML file from internet Pin
ThatsAlok4-Apr-05 23:20
ThatsAlok4-Apr-05 23:20 
GeneralRe: Read and parse XML file from internet Pin
doctorpi4-Apr-05 23:25
doctorpi4-Apr-05 23:25 
GeneralRe: Read and parse XML file from internet Pin
ThatsAlok4-Apr-05 23:33
ThatsAlok4-Apr-05 23:33 
GeneralSerial port timeouts Pin
Cedric Moonen4-Apr-05 21:29
Cedric Moonen4-Apr-05 21:29 
GeneralRe: Serial port timeouts Pin
Blake Miller6-Apr-05 6:37
Blake Miller6-Apr-05 6:37 
I am pretty sure, based on my experiences, that it means the read will WAIT nearly forever.
You really DO want some timeouts, and then just accept what characters you have and accumulate them into your own buffer until you have the desired amount of characters, or consider it an error condition if you have not received enough in the alloted time.

Same for writing. If they don't go out the port right away, in the alloted time frame, then something else is probably wrong, like the modem is off or the serial line is disconnected or something.

I would not recommend writing code that will 'wait forever' in either case if you can help it.

If you don't expect the same amount of data to be read or written constantly, there is the SetCommTimeouts() function you can call prior to each read and write. Use some math to adjust the time frame estimate based upon your current bit rate and the number of characters.

GeneralWriting the virtual serial port driver Pin
Neha.marwaha4-Apr-05 20:48
Neha.marwaha4-Apr-05 20:48 
GeneralNobody has answered my question Pin
SanjaySMK4-Apr-05 20:43
SanjaySMK4-Apr-05 20:43 
GeneralRe: Nobody has answered my question Pin
Dudi Avramov4-Apr-05 22:15
Dudi Avramov4-Apr-05 22:15 
GeneralOutlook object library and windows service.. Pin
Muhammad Irfan Azam4-Apr-05 19:40
Muhammad Irfan Azam4-Apr-05 19:40 
GeneralRe: Outlook object library and windows service.. Pin
Blake Miller6-Apr-05 6:40
Blake Miller6-Apr-05 6:40 
GeneralGlobal Variables Pin
LordTygger4-Apr-05 19:34
LordTygger4-Apr-05 19:34 
GeneralRe: Global Variables Pin
Michael Dunn4-Apr-05 19:47
sitebuilderMichael Dunn4-Apr-05 19:47 
GeneralRe: Global Variables Pin
LordTygger4-Apr-05 20:06
LordTygger4-Apr-05 20:06 
GeneralRe: Global Variables Pin
S. Senthil Kumar4-Apr-05 22:16
S. Senthil Kumar4-Apr-05 22:16 
GeneralRe: Global Variables Pin
LordTygger4-Apr-05 22:32
LordTygger4-Apr-05 22:32 
GeneralWinSock Api tutorial Pin
brilliant1014-Apr-05 19:32
brilliant1014-Apr-05 19:32 
GeneralRe: WinSock Api tutorial Pin
ThatsAlok4-Apr-05 19:50
ThatsAlok4-Apr-05 19:50 
GeneralRe: WinSock Api tutorial Pin
Andrew Walker4-Apr-05 21:06
Andrew Walker4-Apr-05 21:06 
Question!!HELP!!Is it possible to stop drag and drop? Pin
atsuki4-Apr-05 19:14
atsuki4-Apr-05 19:14 
AnswerRe: !!HELP!!Is it possible to stop drag and drop? Pin
David Crow5-Apr-05 3:13
David Crow5-Apr-05 3:13 
GeneralRe: !!HELP!!Is it possible to stop drag and drop? Pin
atsuki6-Apr-05 18:36
atsuki6-Apr-05 18:36 
GeneralRe: !!HELP!!Is it possible to stop drag and drop? Pin
David Crow7-Apr-05 2:17
David Crow7-Apr-05 2:17 

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.