I think it depends on the status, and re-thinking what I said in a hurry
this morning, of course there really are status returns that will return
data, but are not STATUS_SUCCESS. That 32 bit value going into
IoStatus->Status is the “status” of the operation, not necessarily an
error; Error, Warning, Information, Success are the typical definitions,
and many of them legitimately will return data, requiring a value in
Information.
In my drivers, if I return Status == Error, I set Information to zero,
which I believe, is the proper value for a true error (0x8xxxxxxx). Driver
Verifier will change the value of STATUS_SUCCESS as I have seen to test
for such silliness as “if (STATUS_SUCCESS == status)” instead of using the
NT_SUCCESS macro.
Gary G. Little
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@probo.com
Sent: Tuesday, June 27, 2006 11:19 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] trouble when read data from driver through the 2nd
device object.
xxxxx@seagate.com wrote:
How did you set IRP->IoStatus->Status? If it is not STATUS_SUCCESS,
then setting the bytes to return is spurious.
Is it? If a buffer is too small, I thought I could return partial data
along with an error that the client could detect and act on if it needed
to.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer