Hi,
I have a disk filter driver (upper filter, 1. position before partmgr) and also a fsfilter minifilter.
How can I detect - or better how can I filter - that the media was ejected/removed from the device?
I mean is there something the driver can listen for to “know” that it was ejected?
Sure I can always poll and when I get a kind of “no media present” I know it was ejected, but I would prefer a kind of IOCTL or something I could filter and know that it was ejected or maybe also in trigger to get ejected.
I’m working currently with RDX devices.
Thx
Norbert
You can use WM_DEVICECHANGE Messages with WndProc method to detect any
device change.
On Fri, Aug 27, 2010 at 4:28 AM, wrote:
> Hi,
>
> I have a disk filter driver (upper filter, 1. position before partmgr) and
> also a fsfilter minifilter.
>
> How can I detect - or better how can I filter - that the media was
> ejected/removed from the device?
> I mean is there something the driver can listen for to “know” that it was
> ejected?
> Sure I can always poll and when I get a kind of “no media present” I know
> it was ejected, but I would prefer a kind of IOCTL or something I could
> filter and know that it was ejected or maybe also in trigger to get ejected.
>
> I’m working currently with RDX devices.
>
>
> Thx
> Norbert
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Prageeth Madhushanka
Sri Lanka
ok, would be possible.
but I’m looking for something inside disk upper filter.
So a IRP based changed notification.