how to close the opened file handle?

Hi everyone:
I want to write a disk format tool like format.com in windows.
but how to implement the “format /X” option. The “/X” option will
force the opened handle on this volume to close.
Thank you very much!

Just call FSCTL_DISMOUNT_VOLUME without preceding FSCTL_LOCK_VOLUME.


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

wrote in message news:xxxxx@ntfsd…
> Hi everyone:
> I want to write a disk format tool like format.com in windows.
> but how to implement the “format /X” option. The “/X” option will
> force the opened handle on this volume to close.
> Thank you very much!
>

Thank you Maxim S. Shatskih.
Your “shadow” product is really wonderful!