Tech Support > Microsoft Windows > Drivers > *InputDataConsumed always = 0 (moufiltr)
*InputDataConsumed always = 0 (moufiltr)
Posted by Liang Fu on April 21st, 2005


Hi everyone,
I found that in MouFilter_ServiceCallback the input data always contain one
packet (InputDataStart + 1 = InputDataEnd) but *InputDataConsumed always = 0
(I don't know if this parameter is used by any other driver, eg. mouclass).
Can anyone explain this?
Thanks in advance.
Liang Fu


Posted by Doron Holan [MS] on April 22nd, 2005


usually the port driver has one packet to report, but there can be more if
there is high ISR latency, so do not depend on this. InputDataConsumed is
for the service callback function itself. it tells the driver which called
the function how many packets were consumed so that it can free them or
reuse them.

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.


"Liang Fu" <liang_fu_dr@hotmail.com> wrote in message
news:e9sgt7pRFHA.3988@tk2msftngp13.phx.gbl...


Posted by Liang Fu on April 24th, 2005


Doron,
Thanks for your help.
I can use InputDataStart and InputDataEnd to figure out the actual buffer
length and use it in moufiltr, but presently the input InputDataConsumed is
used to call the upper driver. That makes me a little uncomfortable. But on
the other hand I am afraid that using the actual InputDataConsumed to call
the upper driver could cause other problem. What's your suggestion?
Liang Fu

"Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
news:uWD$yT1RFHA.3076@TK2MSFTNGP14.phx.gbl...


Posted by Doron Holan [MS] on April 26th, 2005


what problems are you afraid of? the only condition that can occur is after
you call the upper service callback, if *InputDataConsumed != the number of
input packets that were reported. in that case, you will see the unconsumed
packets again in the next call to your service callback.

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.


"Liang Fu" <liang_fu_dr@hotmail.com> wrote in message
news:%23KtXERmSFHA.3184@TK2MSFTNGP09.phx.gbl...


Posted by Liang Fu on April 27th, 2005


Thanks Doron,
Then, should I use the calculated (from InputDataStart/End to call the upper
ServiceCallback?
Liang Fu

"Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
news:u37XNFnSFHA.2908@tk2msftngp13.phx.gbl...


Posted by Doron Holan [MS] on April 28th, 2005


you should use whatever values you want the system to see. if you remove
them, then don't report the packets you removed.

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.


"Liang Fu" <liang_fu_dr@hotmail.com> wrote in message
news:OFzSL8zSFHA.3548@TK2MSFTNGP10.phx.gbl...



Similar Posts