Click here to Skip to main content
15,914,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralProperty Sheet ShortCuts Pin
Prakash Nadar8-Jan-04 19:16
Prakash Nadar8-Jan-04 19:16 
GeneralVisual C++ NET Pin
java_jedi8-Jan-04 18:44
java_jedi8-Jan-04 18:44 
GeneralRe: Visual C++ NET Pin
Antti Keskinen8-Jan-04 20:02
Antti Keskinen8-Jan-04 20:02 
QuestionTBCD ?? Pin
Jagadeesh VN8-Jan-04 18:37
Jagadeesh VN8-Jan-04 18:37 
GeneralSerial communication and how to timeout Pin
J.B.8-Jan-04 18:33
J.B.8-Jan-04 18:33 
GeneralRe: Serial communication and how to timeout Pin
Antti Keskinen8-Jan-04 20:11
Antti Keskinen8-Jan-04 20:11 
GeneralRe: Serial communication and how to timeout Pin
J.B.9-Jan-04 1:26
J.B.9-Jan-04 1:26 
GeneralRe: Serial communication and how to timeout Pin
Antti Keskinen9-Jan-04 3:49
Antti Keskinen9-Jan-04 3:49 
According to the MSDN reference:

The Sleep function suspends the execution of the current thread for at least the specified interval.

So, yes, it works in a multi-threaded application: it suspends the execution of the thread from which it is called. As for the reason of why you were unable to call the function from your programs: make sure you are calling the function Sleep(), not sleep(). The first one exists, the latter one doesn't. You must also include windows.h header file and link with Kernel32.lib library.

The serial ports are connectionless: they do not care to where they are connected, as long as a connection exists and the software using the communications configures the ports correctly. So, I believe the most easiest way is to utilize two serial ports. Most computers nowadays have two serial ports. Just obtain a cross-connected serial link cable (or do one yourself), then interconnect two of your computer's serial ports. Make your comms program write to the first port, and put some terminal program, e.x. HyperTerminal, to listen on the receiving end. Just remember to set the terminal program's port attributes correctly, otherwise you might get no results at all.

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: Serial communication and how to timeout Pin
J.B.9-Jan-04 4:09
J.B.9-Jan-04 4:09 
GeneralRe: Serial communication and how to timeout Pin
SiddharthAtw8-Jan-04 21:41
SiddharthAtw8-Jan-04 21:41 
GeneralRe: Serial communication and how to timeout Pin
J.B.9-Jan-04 1:29
J.B.9-Jan-04 1:29 
GeneralPlease help me!! Pin
Ryulee8-Jan-04 18:16
Ryulee8-Jan-04 18:16 
GeneralRe: Please help me!! Pin
David Crow9-Jan-04 3:32
David Crow9-Jan-04 3:32 
GeneralRe: Please help me!! Pin
Ryulee11-Jan-04 17:42
Ryulee11-Jan-04 17:42 
GeneralRe: Please help me!! Pin
David Crow12-Jan-04 2:32
David Crow12-Jan-04 2:32 
GeneralRe: Please help me!! Pin
Ryulee14-Jan-04 17:11
Ryulee14-Jan-04 17:11 
QuestionHow can i get this event what the virtual address of my process be changed by the windows?? Pin
zx_sanjin8-Jan-04 15:14
zx_sanjin8-Jan-04 15:14 
AnswerRe: How can i get this event what the virtual address of my process be changed by the windows?? Pin
l a u r e n8-Jan-04 17:04
l a u r e n8-Jan-04 17:04 
GeneralGrabbing messages while busy Pin
Ernesto D.8-Jan-04 15:07
Ernesto D.8-Jan-04 15:07 
GeneralRe: Grabbing messages while busy Pin
Christian Graus8-Jan-04 15:15
protectorChristian Graus8-Jan-04 15:15 
GeneralRe: Grabbing messages while busy Pin
l a u r e n8-Jan-04 17:06
l a u r e n8-Jan-04 17:06 
GeneralRe: Grabbing messages while busy Pin
Tim Smith9-Jan-04 4:08
Tim Smith9-Jan-04 4:08 
GeneralRe: Grabbing messages while busy Pin
Ernesto D.8-Jan-04 18:27
Ernesto D.8-Jan-04 18:27 
GeneralRe: Grabbing messages while busy Pin
2249178-Jan-04 22:29
2249178-Jan-04 22:29 
GeneralUrgent: Calling Child Dialog when press F2. Pin
IrishSonic8-Jan-04 14:08
IrishSonic8-Jan-04 14:08 

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.