CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Posts
    1

    Question Formatting a removable disk drive

    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.
    Last edited by simonh; January 9th, 2003 at 11:14 PM.

  2. #2
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125
    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.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  3. #3
    Join Date
    Dec 2002
    Posts
    287
    Here's the function you're looking for:

    SHFormatDrive Function

    Opens the Shell's Format dialog.

    http://msdn.microsoft.com/library/de...ormatdrive.asp

    Dan

  4. #4
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125
    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.
    Last edited by TheCPUWizard; January 10th, 2003 at 06:04 AM.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured