Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NTSTATUS & WIn32 error codes

172 views
Skip to first unread message

Clemens Valens

unread,
Nov 9, 2001, 3:35:07 AM11/9/01
to
Probably obvious, but where can I find the mapping between the NTSTATUS
codes and the Win32 error codes? In a book I read that the kernel takes care
of that, without telling how. I would like to return something more
meaningfull than STATUS_SUCCESS or STATUS_UNSUCCESSFULL, but there are too
many codes.

TIA
Clemens


keithmo

unread,
Nov 9, 2001, 5:16:32 AM11/9/01
to
The kernel knows nothing about Win32 error codes, everything is done with
NTSTATUS codes. The mapping from NTSTATUS to Win32 is done in user mode.

If you just need to map an NTSTATUS value to a Win32 error, use
LsaNtStatusToWinError() (in ADVAPI32.DLL).


KM

Maik Jäger

unread,
Nov 9, 2001, 12:58:33 PM11/9/01
to
Hello Clemens.

> ...where can I find the mapping between the NTSTATUS
> codes and the Win32 error codes? ...

Have a look at the KB article Q113996
"INFO: Mapping NT Status Error Codes to Win32 Error Codes"

M.J

Clemens Valens

unread,
Nov 12, 2001, 4:23:50 AM11/12/01
to
Thanks, that's exactly what I was looking for!

Clemens


0 new messages