Hi,everyone
I wrote a disk format program, which modifies the disk sector directly.
For example , if the original disk is RAW, my program can format is as FAT or FAT32.
But after formatting the disk with this program, the system can’t recognize the disk filesystem. To solve this problem, I have to eject the disk,and insert it again.
So, How can I notify the system in driver that the disk file system has been changed?
User mode method is ok, but kernel mode method is better
Thanks!
The correct sequence:
- FSCTL_LOCK_VOLUME
- do your writes
- FSCTL_DISMOUNT_VOLUME
- FSCTL_UNLOCK_VOLUME
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
wrote in message news:xxxxx@ntfsd…
> Hi,everyone
> I wrote a disk format program, which modifies the disk sector directly.
> For example , if the original disk is RAW, my program can format is as FAT or
FAT32.
> But after formatting the disk with this program, the system can’t recognize
the disk filesystem. To solve this problem, I have to eject the disk,and insert
it again.
>
> So, How can I notify the system in driver that the disk file system has been
changed?
> User mode method is ok, but kernel mode method is better
>
> Thanks!
>
>
Isn’t it sad Max, when we repeat the same answers over and over again
over the years, index them and make it easy to search and still people
don’t respect us enough to even do a little bit of background work?
I don’t mind answering questions and discussing issues (oh, like why the
rename behavior doesn’t fit the documentation - and Lyndon, I’m *ready*
to talk about bizarre streams behavior) but I’m wondering if I’m the
only person who believes that after 10+ years of doing this we deserve
at least some modicum of respect by those asking questions of the forum,
and that doing a search of the archives is a rather minimal level of
effort to ask to demonstrate that respect?
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
>Isn’t it sad Max, when we repeat the same answers over and over again
For me, it’s easy to repeat this short an answer. Also, searching the archives
can be really hard, since sometimes the issue as perceived by the OP does not
match literally any archive tag.
For instance, this dismount issue. I wrote here several times that FORMAT and
CHKDSK /F use this sequence. But sorry, this is not obviously connected to
“notify a filesystem” topic. I needed to read the whole post to understand what
was the OP’s intent under the word of “notify”.
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com