ReactOS
0.4.16-dev-983-g23ad936
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
nts2w32err.c
Go to the documentation of this file.
1
/*
2
* Convert NTSTATUS codes to Win32 error codes: run it
3
* on a NT box AND on a ROS box, then diff the results.
4
*
5
* This utility should help keeping correct how Ros
6
* translates executive's errors codes into Win32 error
7
* codes.
8
*
9
* Usage: nts2w32err [MaxStatusCode] > log.txt
10
*
11
* 2004-01-10 Emanuele Aliberti
12
*
13
*/
14
#define WIN32_NO_STATUS
15
#include <windows.h>
16
#include <stdlib.h>
17
#include <
ntndk.h
>
18
#include <stdio.h>
19
20
int
main
(
int
argc
,
char
*
argv
[])
21
{
22
NTSTATUS
Severity = 0;
23
NTSTATUS
StatusCode =
STATUS_SUCCESS
;
24
NTSTATUS
Status
=
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
}
55
/* EOF */
argc
static int argc
Definition:
ServiceArgs.c:12
NTSTATUS
LONG NTSTATUS
Definition:
precomp.h:26
ERROR_SUCCESS
#define ERROR_SUCCESS
Definition:
deptool.c:10
main
int main()
Definition:
test.c:6
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
printf
#define printf
Definition:
freeldr.h:97
Status
Status
Definition:
gdiplustypes.h:25
sscanf
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
RtlNtStatusToDosError
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
argv
#define argv
Definition:
mplay32.c:18
ntndk.h
EXIT_SUCCESS
#define EXIT_SUCCESS
Definition:
rdjpgcom.c:55
STATUS_SUCCESS
#define STATUS_SUCCESS
Definition:
shellext.h:65
ERROR_MR_MID_NOT_FOUND
#define ERROR_MR_MID_NOT_FOUND
Definition:
winerror.h:321
modules
rosapps
applications
sysutils
utils
nts2w32err
nts2w32err.c
Generated on Thu Apr 17 2025 06:07:34 for ReactOS by
1.9.6