Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Detecting the insert/removal of Compact Flash cards

3 views
Skip to first unread message

scs0

unread,
Feb 11, 2008, 6:13:45 PM2/11/08
to
Supposedly the WM_DEVICECHANGE message will be sent to the main window
of all applications when a device is inserted or removed, but I found
that it does not work. If I attach a USB compact flash card reader to
the PC I receive WM_DEVICECHANGE / DBT_DEVICEARRIVAL messages as I
expect. If I remove the reader I receive WM_DEVICECHANGE /
DBT_DEVICEREMOVECOMPLETE messages. The message fails when I insert
and remove cards into the reader. When this happens I receive no
WM_DEVICECHANGE notifications whatsoever even though I am clearing
inserting and removing hardware which is the entire purpose of this
message!

I checked online and I can't find a real solution (Periodic polling?
Not in my app.). Other threads came to the conclusion that Microsoft
basically screwed up and with Microsoft being Microsoft it's doubtful
they'll ever fix this bug.

What really annoys me is that the OS knows when cards are inserted and
removed because it will popup the dialog that asks what should be done
with the card. Is this accomplished with a notification that's part
of the private API that Microsoft doesn't reveal? Does anyone know
what this secret message is?

Good ol' Microsoft does it again.

Sam of California

unread,
Feb 18, 2008, 1:03:01 PM2/18/08
to
What happens when you disconnect and connect the card reader? It makes sense
to me that the card reader is a device but not the media. So I would look
for a message sent for removeable media.


"scs0" <sc...@vol.com> wrote in message
news:3a169681-a2ca-4388...@i12g2000prf.googlegroups.com...

0 new messages