![]() |
Brad's VB-32 Programs & Samples |
|
| Posted: 06/26/97, last update: 06/26/97 | ||
| The undocumented
SHFormatDrive function I keep seeing people ask about this function so I thought I'd take a shot at it. This is as far as I got verifying the info floating around the Deja News database at http://www.dejanews.com/ Because at the time of this writing the function is not documented by MS, I'm assuming the info found there was obtained through trial and error. I definitely confirmed the info below through my own trial and error, and suggest you verify everything for yourself as well. The parameter and constant names are obviously a result of personal preference. Note: This function behaves differently on Win95 & WinNT4 (see the iCapacity, iFormatType & return value descriptions). The Win95 implementation seems OK. But considering the different dialog options on WinNT, and that I'm running it on the FAT file system & with no compression, other parameter values may be available. Overview: The SHFormatDrive brings up the system-defined Format dialog box and selects specified options.... Declare Function SHFormatDrive Lib "shell32" _
(ByVal hwndOwner As Long, _
ByVal iDrive As Long, _
ByVal iCapacity As Long, _
ByVal iFormatType As Long) As Long
Return values
SHFormatDrive can also be passed to rundll32 and run from a command line via:
but it's command line parameters don't seem to be recognized. |