Click here to Skip to main content
15,887,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Threads and server side applications Pin
unknown soldier15-May-02 0:01
unknown soldier15-May-02 0:01 
GeneralMulti-language Pin
14-May-02 23:43
suss14-May-02 23:43 
GeneralRe: Multi-language Pin
Christian Graus15-May-02 3:03
protectorChristian Graus15-May-02 3:03 
GeneralRe: Multi-language Pin
Paul M Watt15-May-02 8:27
mentorPaul M Watt15-May-02 8:27 
GeneralRe: Multi-language Pin
15-May-02 22:57
suss15-May-02 22:57 
GeneralHelp................................ Pin
johny quest14-May-02 23:26
johny quest14-May-02 23:26 
GeneralRe: Help................................ Pin
Jon Hulatt15-May-02 0:12
Jon Hulatt15-May-02 0:12 
GeneralReadFile function Pin
14-May-02 22:54
suss14-May-02 22:54 
Hi there!
I'd like to use the ReadFile function to read data from a serial port. But there are few thing that I don't really understand.
So here's this function:
ReadFile(HANDLE hFile, // handle of file to read
LPVOID lpBuffer, // address of buffer that receives data
DWORD nNumberOfBytesToRead, // number of bytes to read
LPDWORD lpNumberOfBytesRead,// address of number of bytes read
LPOVERLAPPED lpOverlapped // address of structure for data
);

What i don't relly understand is:
nNumberOfBytesToRead - I know that it shows, how many bytes i want to read, but is it changed when the function returns? I saw that some people uses it to see how many bytes were recieved. Does it show it? Or maybe the lpNumberOfBytesRead does show it.

Thanks for the answers!
GeneralRe: ReadFile function Pin
Niklas L14-May-02 23:24
Niklas L14-May-02 23:24 
GeneralMultiThreaded Progress bar Pin
SamirSood14-May-02 22:36
SamirSood14-May-02 22:36 
GeneralRe: MultiThreaded Progress bar Pin
Jon Hulatt14-May-02 23:57
Jon Hulatt14-May-02 23:57 
GeneralRe: MultiThreaded Progress bar Pin
SamirSood15-May-02 0:14
SamirSood15-May-02 0:14 
GeneralRe: MultiThreaded Progress bar Pin
Todd Smith15-May-02 7:31
Todd Smith15-May-02 7:31 
Generalcode for MultiThreaded Progress bar Pin
Hesham Amin15-May-02 0:45
Hesham Amin15-May-02 0:45 
GeneralRe: code for MultiThreaded Progress bar Pin
Stephen C. Steel16-May-02 11:59
Stephen C. Steel16-May-02 11:59 
QuestionWriting a driver? Pin
karanba14-May-02 22:21
karanba14-May-02 22:21 
AnswerRe: Writing a driver? Pin
Jon Hulatt14-May-02 23:58
Jon Hulatt14-May-02 23:58 
Generalincloming socket address Pin
Kristian3314-May-02 22:09
Kristian3314-May-02 22:09 
GeneralRe: incloming socket address Pin
Rickard Andersson2014-May-02 22:20
Rickard Andersson2014-May-02 22:20 
GeneralRe: incloming socket address Pin
Nish Nishant14-May-02 22:21
sitebuilderNish Nishant14-May-02 22:21 
GeneralRe: incloming socket address Pin
markkuk14-May-02 22:21
markkuk14-May-02 22:21 
GeneralRe: incloming socket address Pin
Orbital^14-May-02 22:26
Orbital^14-May-02 22:26 
GeneralRe: incloming socket address Pin
Kristian3314-May-02 22:45
Kristian3314-May-02 22:45 
GeneralSTL program Pin
Orbital^14-May-02 21:41
Orbital^14-May-02 21:41 
GeneralRe: STL program Pin
Christian Graus14-May-02 22:00
protectorChristian Graus14-May-02 22:00 

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.