Help with WriteFile and ReadFile

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I need to send and receive data through RS-232 port in a synchronous way.
The problem is that the data packet I need to send and receive is huge so I
need to send and receive it in two or more segments.

But I need to do that with two functions one to read and one to send in such
a way that those functions wait until all data has been received/sent.

Can anybody help me with this?

Thanks,

Robe.
 
Robe said:
Hi,

I need to send and receive data through RS-232 port in a synchronous way.
The problem is that the data packet I need to send and receive is huge so
I
need to send and receive it in two or more segments.

But I need to do that with two functions one to read and one to send in
such
a way that those functions wait until all data has been received/sent.

Can anybody help me with this?

Which library are you using? .NET? MFC? Win32 API? something else?
 
Robe said:
I'm using Win32 API.

Ok, microsoft.public.vc.language or microsoft.public.win32.programmer.*
newsgroups would be better. This one is specific to using C++ in .NET
programs.

Anyway, can you create one or two new threads to do the serial data transfer
and then use WaitForSingleObject / WaitForMultipleObjects to wait for the
transfer to finish?
 
Back
Top