ffi.errno: the value of errno received from the most recent C call in this thread, and passed to the following C call, is available via reads and writes of the property ffi.errno. On Windows we also save and restore the GetLastError() value, but to access it you need to declare and call the GetLastError() function as usual.
See docs https://cffi.readthedocs.org/en/release-0.6/
ffi.errno
is a property of thecffi.FFI
object.e.g.