On 11.02.2016 06:14, Jianqiu Zhang wrote:
You do not have to create your own translation tables. Just translate the NTSTATUS into an error code, similar to how its done in kernel32:
SetLastError(RtlNtStatusToDosError(status));
I found SetLastError(RltNtStatusToDosError(status)) behaved not correct , when the file length is very long , It give the error code ERROR_INVALID_PARAMETER
but Windows give the ERROR_FILENAME_EXCED_RANGE
should I omit this and just use SetLastError(RtlNtStatusToDosError(status)) or maullay set the error code to ERROR_FILENAME_EXCED_RANGE?
I would suggest to omit it. The correct place to fix that is most likely somewhere else, and not in the part you are currently working on.