> > Hi,
> >     I think I've found a ref-count bug in
> win32file.GetQueuedCompletionStatus
> 
> You have indeed!  GetQueuedCompletionStatus used to assume that the
> OVERLAPPED object was previously added to the IOCP via
> PortQueuedCompletionStatus.  I've now fixed that bug and checked the changes
> into CVS.
> 

Thanks.

> Thanks very much for the effective repro case - it allowed me to see your
> issue quickly and I even borrowed that code for the test suite.

Feel free to use it!

> 
> Let me know if you would like a new version of the affected DLLs (and what
> Python version you use).

I'm not in a hurry right now, since I made a work-around with ctypes

    def GetQueuedCompletionStatus(port, timeout):
        from ctypes import windll, c_long, c_void_p, byref
        n = c_long()
        k = c_long()
        o = c_void_p()
        r = windll.kernel32.GetQueuedCompletionStatus(
                        int(port), byref(n), byref(k),
                        byref(o), timeout)
        return r, n.value, k.value, o.value

and this does the job perfectely.

b.t.w. the bug 'worked' in both python-2.3.5 and python-2.4.1

> 
> Cheers,
> 
> Mark
____________________________________________________________________________
Fred Gansevles <mailto:[EMAIL PROTECTED]> Phone: +31 53 489 4613
Org.: Twente University, Fac. of EWI, Box 217, 7500 AE Enschede, Netherlands
"Linux is like a wigwam, No windows, no gates and an apache inside"
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to