ReactOS 0.4.15-dev-8145-ga541a46
nts2w32err.c File Reference
#include <windows.h>
#include <stdlib.h>
#include <ntndk.h>
#include <stdio.h>
Include dependency graph for nts2w32err.c:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 

Functions

int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 14 of file nts2w32err.c.

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Definition at line 20 of file nts2w32err.c.

21{
22 NTSTATUS Severity = 0;
23 NTSTATUS StatusCode = STATUS_SUCCESS;
25 DWORD LastError = ERROR_SUCCESS;
26 DWORD Maximum = 0x40000;
27
28 if (2 == argc)
29 {
30 sscanf (argv[1], "%lx", & Maximum);
31 }
32
33 printf ("NT error codes 0x0-0x%lx that get translated *not* to ERROR_MR_MID_NOT_FOUND (317)\n\n", Maximum);
34
35 for ( Severity = 0;
36 Severity < 4;
37 Severity ++)
38 {
39 printf ("--- Severity %ld ---\n", Severity);
40
41 for ( StatusCode = STATUS_SUCCESS;
42 StatusCode <= Maximum ;
43 StatusCode ++)
44 {
45 Status = ((Severity << 30) | StatusCode);
46 LastError = RtlNtStatusToDosError (Status);
47 if (ERROR_MR_MID_NOT_FOUND != LastError)
48 {
49 printf ("0x%08lx => %ldL\n", Status, LastError);
50 }
51 }
52 }
53 return EXIT_SUCCESS;
54}
static int argc
Definition: ServiceArgs.c:12
LONG NTSTATUS
Definition: precomp.h:26
#define ERROR_SUCCESS
Definition: deptool.c:10
unsigned long DWORD
Definition: ntddk_ex.h:95
#define printf
Definition: freeldr.h:97
Status
Definition: gdiplustypes.h:25
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
#define argv
Definition: mplay32.c:18
#define EXIT_SUCCESS
Definition: rdjpgcom.c:55
#define STATUS_SUCCESS
Definition: shellext.h:65
#define ERROR_MR_MID_NOT_FOUND
Definition: winerror.h:321