Windows 2000, SP1
128+ RAM
I am trying to understand a status message that a Read/WriteFile function is
getting when they are being used to transfer data to or from my driver. The
status returns immediately from the OS without ever entering the drivers
Dispatch functions. The errant status is code of 0x1453, or
“ERROR_WORKING_SET_QUOTA”. I’ve tried setting the quota to the maximum
returned from SetProcessWorkingSet plus the total number of bytes I allocate
dynamically, but this does not always resolve the issue. Obviously there is
a mechanism that I’m not grasping, and I need to understand the problem to
resolve the issue. (Read that as: I have a customer beating down my door for
a fix.)
The typical mechanism is that a buffer is allocated and sent to the driver
to fetch a descriptor. This descriptor is returned from the driver and
basically is used to direct the next action. If the action is receive, then
a buffer of the requested length is allocated and a ReadFile is executed on
the driver. If it’s a send, then the proper buffer to send is allocated,
filled, and a WriteFile executed. It is this read or write that gets the
quota error status, and not the IO control call that gets the descriptor.
Note that the buffer that is allocated and sent to the IO control call to
get a descriptor is the same one that is later returned in the read or
write. The only difference is that the “blanks” have been filled in
according to the remote’s request.
PDL might make more since here
Allocate a descriptor
Call DeviceIoControl with that descriptor
Wait for descriptor
If no error then
Set descriptor->buffer to an allocated buffer of descriptor->length
If descriptor->direction == receive then
ReadFile with the descriptor
(“ERROR_WORKING_SET_QUOTA” returns on an immediate return)
Else
WriteFile with the descriptor
(“ERROR_WORKING_SET_QUOTA” returns on an immediate return)
Endif
Endif
In other words … the allocated descriptor is first used to get what the
Initiator wants to do and then used to do it. Does the descriptor need to be
“sanctified” again, before the Read or Write? Did the IoCompleteRequest in
the DevicveIoControl call some how make it “dirty”?
Gary
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com