Ok the deal is that i am writing a virtual CD/DVD Emulator (thats good) for
good purposes ( Automating a test sequence for system software) but i am
using Storage Class (CDROM) (Thats bad) like Filedisk driver (GPL) by Bo
Bornet . I know that i would have been much better off if i would have used
a SCSI miniport but some constrains out of my controls are compelling me to
do so.
I have created a root enumerated device (through INF) and use its Pdo (well
i am adhering to WDM with PnP and Power Management, more over i am using
generic.sys provided by Mr. Walter Oney of the WDM Programming fame to
manage all the lowlevel PnP and Power management stuff).
I am able to get a working drive out of an ISO image and mount it over a
driver letter. But i am not able to send Media Change notification to the
Shell and other top level windows like most of the cdrom.sys. I am trying to
notify the system about an ejection but nobody get a WM_DEVICECHANGE. I am
using IoReportTargetDeviceChangeAsynchronous with
GUID_IO_MEDIA_EJECT_REQUEST to notify the PnP Manager. but no body (I mean
windows) gets a notfication. I am sending this in a System Thread created to
dispatch pending IRPs. the return code from
IoReportTargetDeviceChangeAsynchronous is 0x103 (which is NT_SUCCESS() isn’t
it? ).
Please provide your suggestions!
Thanks and Kudos
Ankit Raizada
–
Ankit Raizada
GUID_IO_MEDIA_EJECT_REQUEST is only for when the device is locked
(PREVENT/ALLOW MEDIUM REMOVAL command), and a user hits the external
eject button.
I think you want GUID_IO_MEDIA_ARRIVAL and GUID_IO_MEDIA_ARRIVAL, and
maybe (if you’re fancy) also to report GUID_IO_MEDIA_BECOMING_READY.
hth,
.
-----Original Message-----
From: Ankit Raizada [mailto:xxxxx@gmail.com]
Sent: Monday, November 14, 2005 5:41 AM
Subject: Notifying system about media change, failure from a class
driver
Ok the deal is that i am writing a virtual CD/DVD Emulator (thats good)
for good purposes ( Automating a test sequence for system software) but
i am using Storage Class (CDROM) (Thats bad) like Filedisk driver (GPL)
by Bo Bornet . I know that i would have been much better off if i would
have used a SCSI miniport but some constrains out of my controls are
compelling me to do so.
I have created a root enumerated device (through INF) and use its Pdo
(well i am adhering to WDM with PnP and Power Management, more over i am
using generic.sys provided by Mr. Walter Oney of the WDM Programming
fame to manage all the lowlevel PnP and Power management stuff).
I am able to get a working drive out of an ISO image and mount it over a
driver letter. But i am not able to send Media Change notification to
the Shell and other top level windows like most of the cdrom.sys. I am
trying to notify the system about an ejection but nobody get a
WM_DEVICECHANGE. I am using IoReportTargetDeviceChangeAsynchronous with
GUID_IO_MEDIA_EJECT_REQUEST to notify the PnP Manager. but no body (I
mean windows) gets a notfication. I am sending this in a System Thread
created to dispatch pending IRPs. the return code from
IoReportTargetDeviceChangeAsynchronous is 0x103 (which is NT_SUCCESS()
isn’t it? ).
Please provide your suggestions!
Thanks and Kudos
Ankit Raizada
–
Ankit Raizada
Tried no help… I mean the PnP manager doesn’t sends *any* MCN to any
thing else.
On 11/15/05, Henry Gabryjelski wrote:
>
>
> GUID_IO_MEDIA_EJECT_REQUEST is only for when the device is locked
> (PREVENT/ALLOW MEDIUM REMOVAL command), and a user hits the external
> eject button.
>
> I think you want GUID_IO_MEDIA_ARRIVAL and GUID_IO_MEDIA_ARRIVAL, and
> maybe (if you’re fancy) also to report GUID_IO_MEDIA_BECOMING_READY.
>
> hth,
> .
>
>
> -----Original Message-----
> From: Ankit Raizada [mailto:xxxxx@gmail.com]
> Sent: Monday, November 14, 2005 5:41 AM
> Subject: Notifying system about media change, failure from a class
> driver
>
> Ok the deal is that i am writing a virtual CD/DVD Emulator (thats good)
> for good purposes ( Automating a test sequence for system software) but
> i am using Storage Class (CDROM) (Thats bad) like Filedisk driver (GPL)
> by Bo Bornet . I know that i would have been much better off if i would
> have used a SCSI miniport but some constrains out of my controls are
> compelling me to do so.
>
> I have created a root enumerated device (through INF) and use its Pdo
> (well i am adhering to WDM with PnP and Power Management, more over i am
> using generic.sys provided by Mr. Walter Oney of the WDM Programming
> fame to manage all the lowlevel PnP and Power management stuff).
>
> I am able to get a working drive out of an ISO image and mount it over a
> driver letter. But i am not able to send Media Change notification to
> the Shell and other top level windows like most of the cdrom.sys. I am
> trying to notify the system about an ejection but nobody get a
> WM_DEVICECHANGE. I am using IoReportTargetDeviceChangeAsynchronous with
> GUID_IO_MEDIA_EJECT_REQUEST to notify the PnP Manager. but no body (I
> mean windows) gets a notfication. I am sending this in a System Thread
> created to dispatch pending IRPs. the return code from
> IoReportTargetDeviceChangeAsynchronous is 0x103 (which is NT_SUCCESS()
> isn’t it? ).
>
> Please provide your suggestions!
>
> Thanks and Kudos
>
> Ankit Raizada
>
> –
> Ankit Raizada
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
–
Ankit Raizada
Room No. 349
Boys Hostel
IIITA Campus
Deoghat Jhalwa
Allahabad - 211012
Email: xxxxx@iiita.ac.in
xxxxx@yahoo.com
xxxxx@gmail.com
There’s not a whole lot of info in your e-mail. Typically, things which
you have already tried, things you have investigated, and/or things
which confuse you often help getting better answers from this list the
first time around. Let’s see what other questions I can ask…
Does the PnP manager still send these for “real” devices? If not, I
have no ideas.
Do you have a test app that called RegisterDeviceNotification()) for
your device? If not, try that and see if it works.
If you have a test app, and it is getting events, perhaps you are not
being recognized as a CDROM device by the shell? (I presume that is what
you want?) Check your DeviceInterface code, make sure you use the right
GUID, make sure you set it active at the right times, etc.
hth,
.
-----Original Message-----
From: Ankit Raizada [mailto:xxxxx@gmail.com]
Sent: Tuesday, November 15, 2005 9:54 AM
Subject: Re: Notifying system about media change, failure from a class
driver
Tried no help… I mean the PnP manager doesn’t sends *any* MCN to
any thing else.
On 11/15/05, Henry Gabryjelski wrote:
GUID_IO_MEDIA_EJECT_REQUEST is only for when the device is
locked
(PREVENT/ALLOW MEDIUM REMOVAL command), and a user hits the
external
eject button.
I think you want GUID_IO_MEDIA_ARRIVAL and
GUID_IO_MEDIA_ARRIVAL, and
maybe (if you’re fancy) also to report
GUID_IO_MEDIA_BECOMING_READY.
hth,
.
-----Original Message-----
From: Ankit Raizada [mailto:xxxxx@gmail.com]
Sent: Monday, November 14, 2005 5:41 AM
Subject: Notifying system about media change, failure from a
class
driver
Ok the deal is that i am writing a virtual CD/DVD Emulator
(thats good)
for good purposes ( Automating a test sequence for system
software) but
i am using Storage Class (CDROM) (Thats bad) like Filedisk
driver (GPL)
by Bo Bornet . I know that i would have been much better off if
i would
have used a SCSI miniport but some constrains out of my controls
are
compelling me to do so.
I have created a root enumerated device (through INF) and use
its Pdo
(well i am adhering to WDM with PnP and Power Management, more
over i am
using generic.sys provided by Mr. Walter Oney of the WDM
Programming
fame to manage all the lowlevel PnP and Power management stuff).
I am able to get a working drive out of an ISO image and mount
it over a
driver letter. But i am not able to send Media Change
notification to
the Shell and other top level windows like most of the
cdrom.sys. I am
trying to notify the system about an ejection but nobody get a
WM_DEVICECHANGE. I am using
IoReportTargetDeviceChangeAsynchronous with
GUID_IO_MEDIA_EJECT_REQUEST to notify the PnP Manager. but no
body (I
mean windows) gets a notfication. I am sending this in a System
Thread
created to dispatch pending IRPs. the return code from
IoReportTargetDeviceChangeAsynchronous is 0x103 (which is
NT_SUCCESS()
isn’t it? ).
Please provide your suggestions!
Thanks and Kudos
Ankit Raizada
–
Ankit Raizada
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
To unsubscribe send a blank email to
xxxxx@lists.osr.com
–
Ankit Raizada
Room No. 349
Boys Hostel
IIITA Campus
Deoghat Jhalwa
Allahabad - 211012
Email: xxxxx@iiita.ac.in
xxxxx@yahoo.com
xxxxx@gmail.com