RtlNtStatusToDosError - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H

//
// Errors
//

_When_(Status < 0, _Out_range_(>, 0))
_When_(Status >= 0, _Out_range_(==, 0))
NTSYSAPI
ULONG
NTAPI
RtlNtStatusToDosError(
    _In_ NTSTATUS Status
    );

#endif

View code on GitHub
// ntifs.h

NTSYSAPI ULONG RtlNtStatusToDosError(
  [in] NTSTATUS Status
);
View the official Windows Driver Kit DDI reference
// winternl.h

ULONG RtlNtStatusToDosError(
  [in] NTSTATUS Status
);
View the official Win32 API reference

NtDoc

This function is documented in Windows Driver Kit.

Windows Driver Kit DDI reference (nf-ntifs-rtlntstatustodoserror)

RtlNtStatusToDosError function

Description

The RtlNtStatusToDosError routine converts the specified NTSTATUS code to its equivalent system error code.

Parameters

Status [in]

The NTSTATUS code to be converted.

Return value

RtlNtStatusToDosError returns the corresponding system error code. Error codes are defined in Winerror.h.

RtlNtStatusToDosError returns ERROR_MR_MID_NOT_FOUND when the specified NTSTATUS code does not have a corresponding system error code. For more information about system error codes, see System Error Codes.

Remarks

There is no function that provides the inverse functionality of RtlNtStatusToDosError, converting a system error code to its corresponding NTSTATUS code.


Win32 API reference (nf-winternl-rtlntstatustodoserror)

RtlNtStatusToDosError function

Description

Converts the specified NTSTATUS code to its equivalent system error code.

Parameters

Status [in]

The NTSTATUS code to be converted.

Return value

The function returns the corresponding system error code.

Remarks

There is no function that provides the inverse functionality of RtlNtStatusToDosError, which would convert a system error code to its corresponding NTSTATUS code.

ERROR_MR_MID_NOT_FOUND is returned when the specified NTSTATUS code does not have a corresponding system error code.

See also

Error Handling Functions