Click to See Complete Forum and Search --> : Formatting a removable disk drive


simonh
January 9th, 2003, 10:02 PM
Trying to find a function that you can use to format a disk drive. Cannot seem to locate an API function to display the standard windows format dialog.

If it's not possible to access these dialogs directly has anyone come across a class to do the job?

Any help would be much appreciated.

TheCPUWizard
January 9th, 2003, 10:08 PM
a) attachment does not appear to be attached....

b) These dialogs are tyipically difficult to directly access (the best/worst) example is the RAS environment!). You may need to duplicate the functionallity and under the desired conditions call the API routines directly.

DanM
January 10th, 2003, 02:55 AM
Here's the function you're looking for:

SHFormatDrive Function

Opens the Shell's Format dialog.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shformatdrive.asp

Dan

TheCPUWizard
January 10th, 2003, 05:02 AM
Dan is quite correct. The Shell object can do it.

I was responding " Is there a WINAPI function" when responding earlier rather than "Is there a way...".

My point of view was swayed by the forum the question was posted in as well as the phrasing of the original post.

My apologies.