WaitCommEvent error

Discussion in 'Python' started by jim, Sep 26, 2003.

  1. jim

    jim Guest

    Hi, All
    I am using python (activestate 2.2.2-224) on XP home and have suddenly got
    the
    following error from a file which worked fine under millenium.

    self.Overlapped = win32file.OVERLAPPED()
    self.overlapped.hEvent = CreateEvent(None, 0, 0, None)

    hComm = win32file.CreateFile(comport,
    win32con.GENERIC_READ | win32con.GENERIC_WRITE,
    0,
    None,
    win32con.OPEN_EXISTING,
    win32con.FILE_ATTRIBUTE_NORMAL | win32con.FILE_FLAG_OVERLAPPED,
    None)

    Error -

    File "E:\code\Python\PyModbus\FEModbusV101.py", line 162, in ComPortWrite
    rc,mask =win32file.WaitCommEvent(self.hComm,self.Overlapped)
    api_error: (87, 'WaitCommError', 'The parameter is incorrect.')


    I think the api call requires 3 parameters but only 2 are used in python any
    ideas ?

    many thanks
    Jim
     
    jim, Sep 26, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hfk0
    Replies:
    2
    Views:
    21,684
  2. JavaQueries
    Replies:
    1
    Views:
    3,688
    John C. Bollinger
    Mar 1, 2005
  3. Balaji
    Replies:
    3
    Views:
    10,123
  4. jim
    Replies:
    0
    Views:
    537
  5. jim
    Replies:
    0
    Views:
    768
Loading...

Share This Page