mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
added error checking macros
svn path=/trunk/; revision=6825
This commit is contained in:
parent
ee52d15ec0
commit
f495637b1f
1 changed files with 12 additions and 0 deletions
|
@ -3,8 +3,20 @@
|
|||
|
||||
#ifndef __ASM__
|
||||
|
||||
/*
|
||||
NT_SUCCESS return TRUE for a SUCCESS or INFORMATION error code.
|
||||
NT_SUCCESS return FALSE for a WARNING or ERROR error code.
|
||||
Note that !NT_SUCCESS(errCode) is NOT the same as NT_ERROR(errCode)
|
||||
*/
|
||||
#define NT_SUCCESS(StatCode) ((NTSTATUS)(StatCode) >= 0)
|
||||
|
||||
#define NT_INFORMATION(StatCode) ((ULONG)(StatCode) >> 30 == 1)
|
||||
|
||||
#define NT_WARNING(StatCode) ((ULONG)(StatCode) >> 30 == 2)
|
||||
|
||||
#define NT_ERROR(StatCode) ((ULONG)(StatCode) >> 30 == 3)
|
||||
|
||||
|
||||
/*
|
||||
* Possible status codes
|
||||
* FIXME: These may not be the actual values used by NT
|
||||
|
|
Loading…
Reference in a new issue