Tech Support > Microsoft Windows > Drivers > Safe removal for mice
Safe removal for mice
Posted by Robert Marquardt on November 21st, 2004


I have written a USBVIEW clone in Delphi.
As an added feature i try to do a safe removal of mass storage devices.
While experimenting i called CM_Request_Device_Eject on my Logitech
mouse (with Logitech drivers installed).
All other HID devices gave an "in use" error, but my mice got ejected.

Is this a "feature" of the Logitech drivers or a general "feature" of
USB mice?

Another problem is that i seem to overuse the calls. The original
USBVIEW does not give any problems while my program causes strange
problems like a surprise removal popping up.
I do not yet understand that becasue i am fairly sure i do it just like
the original program.

Posted by Doron Holan [MS] on November 22nd, 2004


logitech could very well have an application running which is not listening
to removal requests. try running a mouse w/an inbox driver (mouhid +
mouclass at the mouse layer) and see if it reproduces. the inbox driver
certainly allows for a query remove + remove (which is what eject does).

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.


"Robert Marquardt" <robert_marquardt@gmx.de> wrote in message
news:uHX33G5zEHA.3708@TK2MSFTNGP14.phx.gbl...


Posted by Robert Marquardt on November 24th, 2004


Doron Holan [MS] wrote:

Why can i eject the USB driver while it is used by the system? All other
HID devices i have did not allow to be ejected.
This is definitely a security problem. I could write a denial of service
attack. Maybe a report to Logitech is needed. I had to reinstall my
computer so i can run a test before reinstalling Logitech software.

Posted by Ray Trent on November 24th, 2004


It's hard to tell for sure without knowing the details, but depending on
what the "other HID devices" are, it could be as simple as the fact that
a non-mouse, non-keyboard, non-joystick, HID device often has no
function driver at all (it just sits there as a PDO waiting for someone
to connect to it). The lack of a function driver might explain not being
able to query-remove and remove it, I would think...

Or if they do have drivers, it could be as simple as the authors of all
those drivers either deciding to reject the request for some reason or
being too lazy to properly implement it (ok, to be fair, another
possibility is that they didn't think they needed to).

Robert Marquardt wrote:
--
.../ray\..

Posted by Alexander Grigoriev on November 24th, 2004


To request eject on the devices that don't show themselves in "Safe removal"
list, you may need admin privileges. Even if you eject USB mouse,
unplug/replug will bring it back. I don't see a denial of service condition.
If you have a malicious code, that is able to eject the mouse, running under
your admin account, you have a bigger security problem than mouse ejection.

"Robert Marquardt" <robert_marquardt@gmx.de> wrote in message
news:uV8XmWk0EHA.2200@TK2MSFTNGP09.phx.gbl...


Posted by Robert Marquardt on November 25th, 2004


Alexander Grigoriev wrote:

a) many Windows PCs run as admin
b) not many normal users would think of replugging the mouse

Posted by Robert Marquardt on November 26th, 2004


Robert Marquardt wrote:

It is a general feature. I checked with a freshly installed Win 2000
without Logitech software.


Similar Posts