Re: Is IoStatus.Status reliable?



i have used NT_SUCCESS(status) 99% of the time. for the cases wherei know
the bus returns other status codes which are NT_SUCCESS that i want to
process differently, i would special case out the specific values first. I
have never used NT_WARNING or NT_ERROR or NT_INFORMATION in any driver i
have written to day.


d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"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!!
>>>
>>
>>
>
>


.



Relevant Pages

  • Re: Is IoStatus.Status reliable?
    ... system-supplied macros: ... Evaluates to TRUE if the return value specified by Status is a success ... I take it you were thinking of informational type messages not warning? ... The status is what the lower driver provided (I'm assuming drivers ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Driver Verifier interferes with IoCallDriver ?
    ... > classes: error, warning, success. ... You should test success using the ... >> I am verifying my driver with driver verifier, ...
    (microsoft.public.development.device.drivers)
  • wireless linux driver problems
    ... browsing around the web to find the windows driver, ... iwlist wlan0 [parameters] ... warning: assignment from incompatible pointer type ...
    (Ubuntu)
  • Fax Server Role fails to create shared fax printer
    ... I added the fax server roles to a SBS 2008 server. ... IWorker.Fax.Common.TaskConfigureFaxServer, RootTaskId = ... IWorker.Fax.FaxConfiguration.TaskFaxConfigurationComposite, Success: False, ... Warning: False, Continue: True, Message: The Fax service could not be ...
    (microsoft.public.windows.server.sbs)
  • Re: libata in 2.4.24?
    ... IDE disks report immediate success even before the ... The way CONFIG_IDE (the traditional IDE driver) and libata work right ... > until the write hits disk. ...
    (Linux-Kernel)