O
ORC
Shouldn't 'ReadFile' block when timeouts are specified even when running in
overlapped mode or am I wrong ???
Thanks
Ole
overlapped mode or am I wrong ???
Thanks
Ole
ORC said:Shouldn't 'ReadFile' block when timeouts are specified even when running in
overlapped mode or am I wrong ???
ORC said:Sorry - the readfile is an API call but I write my application in C# and
don't know where else to place my question. The readfile is implemented
through P/Invoke. I have set the COMMTIMEOUTS (also part of the API) to
wait 2 seconds before timeing out during a call to readfile.
ORC said:no it's not part of compact framework or a pocket pc - it's part of .NET and
C#.
I've looking for a windows API group but such one doesn't seems to exist
any suggestion?
Are you saying it's part of the "normal" Win32
as well? Maybe there are bits of MSDN I haven't installed...
The .interop group, perhaps?
ORC said:no it's not part of compact framework or a pocket pc - it's part of .NET
and
C#. I've looking for a windows API group but such one doesn't seems to
exist
any suggestion?
Thanks
Ole
Stefan Simek said:AFAIK, the timeouts in the COMMTIMEOUTS structure set using SetCommTimeouts
apply only to serial ports. And even then, the overlapped operations will
never block, just return an ERROR_IO_PENDING. If you need a timeout, you
should wait on the overlapped event using the WaitOne() or similar function.
HTH,
Stefan