Hi,
If my understanding of the MS docs is correct, the status of overlapped requests is stored as an NT status in lpOverlapped->Internal (As Mike implemented it). The error code returned by GetOverlappedResult() or passed to the completion routine, though, is a DOS error code. Thus in priciple we'd need to convert the status with RtlNtStatusToDosError(), right ?
Moreover, if our async read()/write() operations fail, we simply set the status to STATUS_UNSUCCESSFUL which translates to ERROR_GEN_FAILURE - not very meaningful to our users.
What we'd need would consequently be a errno->NT status converter to set the overlapped status correctly from the error reported by read or write.
I can't seem to find one in the wine code (??). There only seem to be local errno -> DOS error converters, and no DOS error->Nt status converter.
What should we do?
Martin
Martin Wilck Martin.Wilck@fujitsu-siemens.com writes:
What we'd need would consequently be a errno->NT status converter to set the overlapped status correctly from the error reported by read or write.
file_set_error() in server/file.c should do what you want. You can't call the function from the client but you can simply copy the code.