Updating the Device Status

Hi All,
We are working on the Utilities for a Removable IDE Hard Disk.
With the help of custom commands(issued from Kernel Mode Drivers for NT/9x),
we are able to change the status of the drive to Write Protected. But it
seems that the system doesn’t properly recognize the status
(without restarting ).

After WP operation, if we copy files to destination, the Disk Write
Error blue screen(in Win9x) or the “System Process:Lost Delayed Write Data”
error message (in NT\Win2k)comes. In one of the earlier posts Raja had
replied that in 9x this error comes from the VFAT.VXD

The interesting thing is that if we restart the system and try again (using
explorer copy files to the WP drive), the system shows the proper message
that the drive is Write Protected. No blue screens or system error
messages!!!

So there may be some way to update the explorer or other system components
abt the new sts of the drive.So that we can avoid the restart - now needed
after the operation.

Pls share your valuable thoughts
balan


“What lies behind us and what lies before us are tiny matters compared to
what lies within us.” —Emerson

> We are working on the Utilities for a Removable IDE Hard Disk.

With the help of custom commands(issued from Kernel Mode Drivers for
NT/9x),
we are able to change the status of the drive to Write Protected. But it
seems that the system doesn’t properly recognize the status
(without restarting ).

After WP operation, if we copy files to destination, the Disk Write
Error blue screen(in Win9x) or the “System Process:Lost Delayed Write
Data”
error message (in NT\Win2k)comes.

Write a disk filter driver. When going to WP mode, a) flush the FS caches by
IRP_MJ_FLUSH_BUFFERS b) fail the request with STATUS_VERIFY_REQUIRED and set
some flag c) reset the flag while processing the SL_OVERRIDE_VERIFY_VOLUME
IRP.
FSD will be forced to do the volume verify in this case.

Max