win32 WaitCommEvent error?

Grant Edwards grante at visi.com
Mon Nov 18 12:26:40 EST 2002


I've got a program using Win32all that does a WaitCommEvent to
wait for receive data.  I can't find any documentation on
WaitCommEvent at ActiveState.  At MS, it takes three args, but
the Win32all verison only takes two.

The call to WaitCommEvent will work fine for hundreds of
iterations, but after a while I get an exception:

  Exception in thread Thread-2:
  Traceback (most recent call last):
    File "c:\Program files\Python22\lib\threading.py", line 408, in __bootstrap
      self.run()
    File "c:\Program files\Python22\lib\threading.py", line 396, in run
      apply(self.__target, self.__args, self.__kwargs)
    File "wpacket.py", line 80, in master
      rc, mask = WaitCommEvent(handle, rxOverlapped)
  api_error: (87, 'WaitCommError', 'The parameter is incorrect.')

The two parameters to WaitCommEvent() are the same every time
through the loop.  How can I find out which parameter is
incorrect (and what does "incorrect" mean)?  I've read the MSDN
docs on "WaitCommEvent" and they are (as usual) utterly
useless.

-- 
Grant Edwards                   grante             Yow!  Sometime in 1993
                                  at               NANCY SINATRA will lead a
                               visi.com            BLOODLESS COUP on GUAM!!



More information about the Python-list mailing list