Re: Is IoStatus.Status reliable?
- From: "Don Burn" <burn@xxxxxxxxxxxxxxxx>
- Date: Sun, 18 Sep 2005 13:16:07 -0400
My typo, NT_SUCCESS covers SUCCESS and INFORMATION, it was early morning!
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
"David F." <70751.3507@xxxxxxxxxxxxxxxx> wrote in message
news:uR$%234XAvFHA.2396@xxxxxxxxxxxxxxxxxxxxxxx
> That opens a question since the docs read:
> When testing a return value, you should use one of the following
> system-supplied macros (defined in ntdef.h):
>
> NT_SUCCESS(Status)
> Evaluates to TRUE if the return value specified by Status is a success
> type or an informational type (0 ? 0x3FFFFFFF).
> NT_INFORMATION(Status)
> Evaluates to TRUE if the return value specified by Status is an
> informational type (0x40000000 ? 0x7FFFFFFF).
> NT_WARNING(Status)
> Evaluates to TRUE if the return value specified by Status is a warning
> type (0x80000000 ? 0xBFFFFFFF).
> NT_ERROR(Status)
> Evaluates to TRUE if the return value specified by Status is an error
> type (0xC0000000 - 0xFFFFFFFF).
> I take it you were thinking of informational type messages not warning?
>
> "Don Burn" <burn@xxxxxxxxxxxxxxxx> wrote in message
> news:eYy7pL3uFHA.3400@xxxxxxxxxxxxxxxxxxxxxxx
>> Well it should have a status that indicates this, but two things to
>> remember:
>>
>> 1. The status is what the lower driver provided (I'm assuming drivers
>> with the macros you mention), so if they decide to pass STATUS_SUCCESS
>> but only give you half the data, well so be it.
>>
>> 2. NT_SUCCSS returns true for either SUCCESS or WARNING class messages,
>> you need to use:
>>
>> if ( NT_SUCCESS(IoStatus.Status) && !NT_WARNING(IoStatus.Status) )
>> ...
>>
>> to test for SUCCESS only.
>>
>>
>>
>> --
>> Don Burn (MVP, Windows DDK)
>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> Remove StopSpam from the email to reply
>>
>>
>> "David F." <70751.3507@xxxxxxxxxxxxxxxx> wrote in message
>> news:%23jqT8l2uFHA.252@xxxxxxxxxxxxxxxxxxxxxxx
>>> Can IoStatus.Status be used to determine result in a CR without a need
>>> to check IoStatus.Information (for say IRP_MJ_READ)?
>>> (In other words, it's not going to be NT_SUCCESS(IoStatus.Status) while
>>> IoStatus.Information reports that it only read half of what it was
>>> supposed to. I mean, I would hope that would only come back NT_WARNING
>>> or NT_ERROR)
>>>
>>> TIA!!
>>>
>>
>>
>
>
.
- References:
- Is IoStatus.Status reliable?
- From: David F.
- Re: Is IoStatus.Status reliable?
- From: Don Burn
- Re: Is IoStatus.Status reliable?
- From: David F.
- Is IoStatus.Status reliable?
- Prev by Date: Re: Is IoStatus.Status reliable?
- Next by Date: Blocking applications
- Previous by thread: Re: Is IoStatus.Status reliable?
- Next by thread: Win 32 WH_GETMESSAGE hooks
- Index(es):
Relevant Pages
|