Re: Asynch COM under Win98

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Roger Levy (rhl_at_i3e.org)
Date: 01/12/05


Date: Wed, 12 Jan 2005 13:47:57 -0500

Keith,
I am mostly not a Windows programmer however about 3 years ago I wrote an MFC
GUI control program that did serial I/O and our objective was to be compatible
with everything from W95 to 2000. I also had problems with W9X and serial
overlapped I/O. I think if you do google/groups searches you will find many
cases of people having similar problems. One popular view is that overlapped
I/O is implemented differently and works much better on NT variants however
another view states that serial overlapped I/O works in W9X but non-serial
overlapped I/O does not. There are all kinds of different anecdotes. In the
end I abandoned overlapped serial I/O in my app and I used P.J. Naughter's
serial driver which you can find at:
http://www.codeproject.com/system/cserialport.asp
IIRC this driver has some overlapped support and based on P.J.'s reputation I
imagine the code has had some fairly wide use and I assume a lot of bugs have
been wrung out.

Roger

Keith Sheppard wrote:
>
> I tried this enquiry once on the messaging newsgroup but got no response.
> Apologies to anyone who's seen it before...
>
> I have an application which drives a device via the serial port. The device
> protocol is such that there are times when the device may send a message or
> may not. I therefore specify FILE_FLAG_OVERLAPPED on my CreateFile call to
> open the COM port and specify an lpOverlapped parameter on every ReadFile
> call.
>
> This is working fine on my Windows XP system. However I have just received
> a bug report from a user saying that the application hangs on his "W98 SE"
> system. Looking at the trace it would appear that I issue a ReadFile call
> (at a time when there may well be no data forthcoming from the device) and
> Windows never returns from that ReadFile.
>
> Are there any "gotchas" in the area of asynchronous reads under Windows 98
> or anyone have any suggestions? I can obtain further diagnostics but it's a
> bit difficult because I don't have a Win98 system myself and can only
> communicate with my user via eMail. Remote debugging under these
> circumstances is a bit of a pain.
>
> Keith

-- 
Change "3e" in my address to "eee"


Relevant Pages

  • Overlapped Serial Ports and buffering
    ... I'm writing a serial port class. ... I converted the class to use basic OVERLAPPED I/O. ... Did this possibly change between Windows 2000 and Windows ...
    (microsoft.public.development.device.drivers)
  • Re: Palatable Windows IO using Ada
    ... This is a higher level protocol. ... So the communication item becomes one byte. ... In my opinion it is overkill to use overlapped I/O for serial ... overlapped I/O and asynchronous system trap could nicely fit to Ada's ...
    (comp.lang.ada)
  • Re: LsaEnumerateAccountsWithUserRight failed with "Overlapped I/O operation is in progress"
    ... Don't use GetLastError() with them (unless the function ... LSA is telling you that it is has finished the enumeration. ... it says "Overlapped I/O operation is in progress.". ... Or is there a way to disable overlapped I/O and use synchnonized I/O ...
    (microsoft.public.platformsdk.security)
  • Re: Writing to Serial Port
    ... I can run WriteFile() and allow my program to run without waiting for the ... > This is overlapped I/O. ... One reason for doing it is that it is necessary ... > to use overlapped I/O with a serial port if one wants full duplex (send ...
    (microsoft.public.vc.mfc)
  • what is Synchronous file access?
    ... ce only support Synchronous file acess,This is the reason why overlapped I/O ... asynchronous => means multiple file access can be done..overlapped i/o is ...
    (microsoft.public.windowsce.platbuilder)