NT Status vs. Dos Error code in async operations
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 Phone: +49 5251 8 15113 Fujitsu Siemens Computers Fax: +49 5251 8 20409 Heinz-Nixdorf-Ring 1 mailto:Martin.Wilck(a)Fujitsu-Siemens.com D-33106 Paderborn http://www.fujitsu-siemens.com/primergy
Martin Wilck <Martin.Wilck(a)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. -- Alexandre Julliard julliard(a)winehq.com
participants (2)
-
Alexandre Julliard -
Martin Wilck