Auto refresh on device insertion/removal

Does anybody know, how can my application respond to the new device
insertion. For example I have a program which scans all removable media
in the system and I would like to refreh the list automaticaly on it
removal or insertion of new one. (Same way as the Windows explorer does
it). Checking system in time intervals doesn’t look good to me.
Can you please help me, what function should I use?

Thanks.

Lubos.


Lubos Baja
developer

NEOVISION s.r.o.
Jinonická 80
158 00 Praha 5

Phone: +420 257 290 604
Fax: +420 257 290 353
private cell: +420 608 316 036

Use RegisterDeviceNotification.

Thanks

SlavaI wrote:

Use RegisterDeviceNotification.

Not this easy, requires a filter driver, but I have the technology which
will allow doing this.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Lubos Baja”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Thursday, October 30, 2003 2:52 PM
Subject: [ntdev] Auto refresh on device insertion/removal

> Does anybody know, how can my application respond to the new device
> insertion. For example I have a program which scans all removable media
> in the system and I would like to refreh the list automaticaly on it
> removal or insertion of new one. (Same way as the Windows explorer does
> it). Checking system in time intervals doesn’t look good to me.
> Can you please help me, what function should I use?
>
> Thanks.
>
> Lubos.
>
>
> –
> Lubos Baja
> developer
>
> NEOVISION s.r.o.
> Jinonick? 80
> 158 00 Praha 5
>
> Phone: +420 257 290 604
> Fax: +420 257 290 353
> private cell: +420 608 316 036
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com