diff options
Diffstat (limited to 'source4/include')
-rw-r--r-- | source4/include/nt_status.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/include/nt_status.h b/source4/include/nt_status.h index 9747f73eb1..d2cf1ceae4 100644 --- a/source4/include/nt_status.h +++ b/source4/include/nt_status.h @@ -60,4 +60,12 @@ typedef uint32 WERROR; #define W_ERROR_IS_OK(x) (W_ERROR_V(x) == 0) #define W_ERROR_EQUAL(x,y) (W_ERROR_V(x) == W_ERROR_V(y)) +/* this defines special NTSTATUS codes to represent DOS errors. I + have chosen this macro to produce status codes in the invalid + NTSTATUS range */ +#define NT_STATUS_DOS(class, code) NT_STATUS(0xF1000000 | ((class)<<16) | code) +#define NT_STATUS_IS_DOS(status) ((NT_STATUS_V(status) & 0xFF000000) == 0xF1000000) +#define NT_STATUS_DOS_CLASS(status) ((NT_STATUS_V(status) >> 16) & 0xFF) +#define NT_STATUS_DOS_CODE(status) (NT_STATUS_V(status) & 0xFFFF) + #endif |