win32file GetOverlappedResult() return value?
Grant Edwards
grante at visi.com
Thu Dec 12 15:31:21 EST 2002
The C version of GetOverlappedResult() returns two values: a
boolean success flag, and a byte count. The Python routine
only returns the latter.
I presume that the boolean return value is checked somewhere
and if there is an error, GetLastError() is called and an
exception is raised? IOW, if I call GetOverlappedResult from
Python, and there's no exception, then I can assume that the
Win32 GetOverlappedResult system call returned true?
I've looked at win32file.i, and am guessing that the snippet
below means "call the function and if it returns false call
GetLastError() and raise an exception, otherwise return the
value named OUTPUT"?
BOOLAPI GetOverlappedResult(
PyHANDLE hFile, // @pyparm <oPyHANDLE>|hFile||The handle to the pipe or file
OVERLAPPED *lpOverlapped, // @pyparm <oPyOVERLAPPED>|overlapped||The overlapped object to check.
unsigned long *OUTPUT, // lpNumberOfBytesTransferred
BOOL bWait // @pyparm int|bWait||Indicates if the function should wait for data to become available.
);
--
Grant Edwards grante Yow! My mind is making
at ashtrays in Dayton....
visi.com
More information about the Python-list
mailing list