Holy cow, I wrote a book!
In a comment, somebody asked what the deal was with the unsafe
device removal dialog in Windows 2000 and why it's gone in Windows XP.
I wasn't involved with that dialog,
but here's what I remember:
The device was indeed removed unsafely.
If it was a USB storage device, for example,
there may have been unflushed I/O buffers.
If it were a printer, there may have been an active print job.
The USB stack doesn't know for sure
(those are concepts at a higher layer that the stack doesn't know about)
- all it knows is that it had an active channel with the device
and now the device is gone, so it gets upset and yells at you.