How to inform Mount Manager of a device that is removed

Hi! everyone
I am writing a class driver for removable media. The driver is not a PNP
driver. When a media is inserted into a drive, I create a device object
(type of FILE_DEVICE_DISK) and notify the Mount Manager by IO control
IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION. Because I delete the device
object when the media is unloaded, I need to notify the Mount Manager of the
media removal. I have looked into the DDK for an similar IO that can be used
to notify Mount Manager of the media removal event, I found nothing I can
use.
Can someone give me an idea. Thanks a lot.

Yaqun

Why not write a PNP driver?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Yaqun
Sent: Tuesday, June 01, 2004 3:00 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to inform Mount Manager of a device that is removed

Hi! everyone
I am writing a class driver for removable media. The driver is not a PNP
driver. When a media is inserted into a drive, I create a device object
(type of FILE_DEVICE_DISK) and notify the Mount Manager by IO control
IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION. Because I delete the device
object when the media is unloaded, I need to notify the Mount Manager of
the media removal. I have looked into the DDK for an similar IO that can
be used to notify Mount Manager of the media removal event, I found
nothing I can use.
Can someone give me an idea. Thanks a lot.

Yaqun


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

This is absolutely incorrect. Look at Disk/ClassPnP source to see the
proper way of removable media handling.

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

----- Original Message -----
From: “Yaqun”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, June 02, 2004 2:00 AM
Subject: [ntdev] How to inform Mount Manager of a device that is removed

> Hi! everyone
> I am writing a class driver for removable media. The driver is not a PNP
> driver. When a media is inserted into a drive, I create a device object
> (type of FILE_DEVICE_DISK) and notify the Mount Manager by IO control
> IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION. Because I delete the device
> object when the media is unloaded, I need to notify the Mount Manager of the
> media removal. I have looked into the DDK for an similar IO that can be used
> to notify Mount Manager of the media removal event, I found nothing I can
> use.
> Can someone give me an idea. Thanks a lot.
>
> Yaqun
>
>
>
> —
> 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