The question was answered, but here’s more less useful information:
The Dekker/Newcomer book actually provides a table giving a NTSTATUS ->
Win32 error mapping. The book says they developed the list by having a
driver return every value in ntstatus.h and then looking at the result of
GetLastError.
MSDN documents
LsaNtStatusToWinError
The LsaNtStatusToWinError function converts an NTSTATUS code returned by an
LSA function to a Windows error code.
ULONG LsaNtStatusToWinError( NTSTATUS Status );
Parameters
Status
An NTSTATUS code returned by an LSA function call. This value will be
converted to a Win32 error code.
Return Values
The return value is the Win32 error code that corresponds to the Status
parameter. If there is no corresponding Win32 error code, the return value
is ERROR_MR_MID_NOT_FOUND.
but it isn’t promising to convert any NTSTATUS, just those “returned by an
LSA function call”.
use RtlNtStatusToDosError() to convert arbitrary system-defined ntstatus
codes to win32errors. it can be very noisy so u might want to patch
dbgprint before u call it & unpatch after.
extern"C"
_declspec(dllimport)
DWORD _stdcall
RtlNtStatusToDosError(
DWORD ntStatus
);
----- Original Message -----
From: “Jay Krell”
To: “File Systems Developers”
Sent: Wednesday, September 13, 2000 9:09 AM
Subject: [ntfsd] Re: STATUS_xxx vs ERROR_xxx codes
> The question was answered, but here’s more less useful information:
>
> The Dekker/Newcomer book actually provides a table giving a NTSTATUS ->
> Win32 error mapping. The book says they developed the list by having a
> driver return every value in ntstatus.h and then looking at the result of
> GetLastError.
>
> MSDN documents
> LsaNtStatusToWinError
> The LsaNtStatusToWinError function converts an NTSTATUS code returned by
an
> LSA function to a Windows error code.
> ULONG LsaNtStatusToWinError( NTSTATUS Status );
> Parameters
> Status
> An NTSTATUS code returned by an LSA function call. This value will be
> converted to a Win32 error code.
> Return Values
> The return value is the Win32 error code that corresponds to the Status
> parameter. If there is no corresponding Win32 error code, the return value
> is ERROR_MR_MID_NOT_FOUND.
>
> but it isn’t promising to convert any NTSTATUS, just those “returned by an
> LSA function call”.
>
> - Jay
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@timesn.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>
>
> MSDN documents
LsaNtStatusToWinError
…is available for LSA authentication packages only, not for any other
code.
Max