Re: How to format a volume
- From: "David Craig" <NoOne@xxxxxxxxxxx>
- Date: Wed, 14 Jun 2006 04:13:59 GMT
Have you read fatgen103.doc? This will answer some of your questions. It
is on whql.
"ijor" <ijor@xxxxxxxxxxxxx> wrote in message
news:6540CF0A-B22E-4072-9017-A65DC3DE0D72@xxxxxxxxxxxxxxxx
"Rhett Gong [MSFT]" wrote:
Unfortunately, SHFormatDrive is the only supported way to format a volume
on all supported platforms.
But if you are targeting to Win2003, Severian [MVP] has suggested a good
class to use ---- WMI Win32_Volume Class.
Thanks for the reply Rhett. And also thank to the others for the ideas and
tips.
I cannot use the WMI method because I cannot restrict to Win2003. And I
cannot use SHFormatDrive because it is interactive, and I need (want) a
programmatic solution. Would be the same to open an explorer windows to
delete a file instead of delete it programmatically.
Well, true, not exactly the same and formatting a volume is a more drastic
and less frequent operation than deleting a file, but you get the point.
Besides, there are officially documented calls to physically format tracks
and to setup/delete partitions. These are even more drastic operations
than
formatting a volume.
The other reasons I cannot use SHFormatDrive is because in some platforms,
explorer doesn't support all the formatting options. Specifically,
explorer
doesn't support formatting 720k floppies on XP.
Btw, I do know that there is a knowledge base article "claiming" that XP
doesn't support formatting 720k disks by design. But the claim is wrong.
XP
supports it using command line and programmatically via IOCTL. Only
explorer
doesn't support it, and the command line doesn't accept the "/f:720"
parameter, but it accepts the equivalent "/t:80 /n:9" parameters.
Now you probably asking . if all you want is to format a floppy why bother
with API and just do this by yourself. Not too difficult to implement the
code for setting up the boot sector, FATS and root directory. This is
probably what I'll end doing. But I was hoping for a more elegant
solution.
Lastly, nobody answered about the IFSKIT. If it documents the calls
internally used or not. I suppose those with the IFSKIT had to sign an
NDA.
Might be Rhett can answer this. It doesn't look like you need to sign an
NDA
now anymore anyway. But the IFSKIT home page hints that the relevant calls
are not documented.
.
- Follow-Ups:
- Re: How to format a volume
- From: ijor
- Re: How to format a volume
- Prev by Date: Re: How to format a volume
- Next by Date: VerQueryValue Bug?
- Previous by thread: Re: How to format a volume
- Next by thread: Re: How to format a volume
- Index(es):
Relevant Pages
|