Hi all,
I have downloaded FormatEx from Sysinternals.com .I am trying to use the
same function in my program , but it behaves unpredictable. It formats
some times , some time it does not…
Wot could be the reason?
Is the source code given on site and exe different?
Bcoz if handles are open for the drive exe Dismounts the volume forcefully
where as source code fails(i mean exe fails for the source code given)
Do i need to Dismount the volume b4 formatting??
Regards
Shekhar
> Bcoz if handles are open for the drive exe Dismounts the volume forcefully
where as source code fails(i mean exe fails for the source code given)
Do i need to Dismount the volume b4 formatting??
Yes, but IIRC the usual FORMAT does the following:
- LOCK
- format
- DISMOUNT
- UNLOCK
Then any access to the volume will mount the new volume.
Max
Yeah Thats TRUE
But the exe given on SysInternals always works where as code fails sometime.
The Diffeence between the two is exe forcefully dismounts the volume where as code does not.
May be there are other solutions .My problem is I want to do the high level quick NTFS formatting on a drive from USER mode , can i do it?
Regards
Shekhar
“Maxim S. Shatskih” wrote:
> Bcoz if handles are open for the drive exe Dismounts the volume forcefully
> where as source code fails(i mean exe fails for the source code given)
> Do i need to Dismount the volume b4 formatting??
Yes, but IIRC the usual FORMAT does the following:
- LOCK
- format
- DISMOUNT
- UNLOCK
Then any access to the volume will mount the new volume.
Max
—
You are currently subscribed to ntfsd as: xxxxx@yahoo.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
If you need to force formatting even if some handles are opened you need to
dismount volume without locking to invalidate handles.
Alexei.
“NewBie” wrote in message news:xxxxx@ntfsd…
>
> Hi all,
> I have downloaded FormatEx from Sysinternals.com .I am trying to use the
> same function in my program , but it behaves unpredictable. It formats
> some times , some time it does not…
> Wot could be the reason?
> Is the source code given on site and exe different?
> Bcoz if handles are open for the drive exe Dismounts the volume forcefully
> where as source code fails(i mean exe fails for the source code given)
> Do i need to Dismount the volume b4 formatting??
> Regards
> Shekhar
>
>