MOUSE_INPUT_DATA for USB HID mouse



Hi all,

I've some queries regarding the MOUSE_INPUT_DATA structure.

I installed the firefly sample from DDK as a upper device filter for a USB
HID mouse. And it is noticed that in the MouFilter_ServiceCallback, there
are always 2 packets MOUSE_INPUT_DATA structure returned. i.e. one for
InputDataStart and one for InputDataEnd. And the InputDataEnd struct is a
'zeroed' struct except the UnitId is always 0x100 and Flags = 7.

Q1. Is this 2 packets thing related to the 'ping-pong IRPs' in the Walter
Oney's "Programming the microsoft windows driver model"? i.e. can I assume
that for HID USB mouse, there are always 2 packets returned by
MouFilter_ServiceCallback?


Q2. Can I assume the 2nd packet returned is used as a delimiter to separate
each MouFilter_ServiceCallback, or it carries different meaning?


Q3. The 'Flags' Attribute specifies 4 mouse indicator flags. But I can't
find any detail explaination of these flags' usage from either DDK or any
other sources. Could anyone please enlighten me or direct me to any sample
or source for using these flags?


Q4. Be more specifically, if I were to change the DPI/CPI of the mouse,
should I just interept and make changes to the LastX and LastY values when
the Flags = MOUSE_MOVE_RELATIVE?? Do I need to do anything when
MOUSE_MOVE_ABSOLUTE and MOUSE_VIRTUAL_DESKTOP?? And in what situation will a
mouse return MOUSE_MOVE_ABSOLUTE and MOUSE_VIRTUAL_DESKTOP flags?


Thanks in advance.

Angela



.



Relevant Pages


Loading