Exception Handling in My Virtual SCSI Driver

I implemented a driver which emulated a SCSI disk with a remote file. To
achieve PnP, A bus driver was added.
When the connection has been set up, everything is fine.
However, in the process of handling READ command(suppose I am reading the
MP3 file on the virtual disk),
once the connection is failed, I send EJECT command directly to the bus
driver. It shows error that I cannot do that.
How can I handle this kind of exception?

Any reply will be appreciated.

paul


Express yourself instantly with MSN Messenger! Download today - it’s FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

I would add a call to your bus driver that would tell it to make the PDO go
away. Your bus driver would then do a IoInvalidateDeviceRelations and
indicate the PDO is no longer present. That way remove handling would take
place…


Mark Cariddi
Consulting Associate
OSR, Open Systems Resources, Inc.
http://www.osr.com/
“paul chen” wrote in message news:xxxxx@ntdev…
>I implemented a driver which emulated a SCSI disk with a remote file. To
>achieve PnP, A bus driver was added.
> When the connection has been set up, everything is fine.
> However, in the process of handling READ command(suppose I am reading the
> MP3 file on the virtual disk),
> once the connection is failed, I send EJECT command directly to the bus
> driver. It shows error that I cannot do that.
> How can I handle this kind of exception?
>
> Any reply will be appreciated.
>
> paul
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it’s FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
>