# Function Reference

# _WinAPI_NtStatusToDosError

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

#include <WinAPIDiag.au3>
_WinAPI_NtStatusToDosError ( $iStatus )

## Parameters

$iStatus | The NTSTATUS error code to be converted.

## Return Value

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

## See Also

Search RtlNtStatusToDosError in MSDN Library.

## Example

    #include <WinAPIDiag.au3>
    #include <WinAPIError.au3>

    Local $iError = _WinAPI_NtStatusToDosError(0xC0000023) ; STATUS_BUFFER_TOO_SMALL

    ConsoleWrite($iError & ' - ' & _WinAPI_GetErrorMessage($iError) & @CRLF)