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

    Question Disc and File Management functions.

    I want to use only Win32 APIs with no calls to any COM components or MFC.

    I want to perform two tasks:-
    1. Know the number of harddisk present on the system.
    2. List all the partitions on the harddisk
    3. Delete all data in the selected partition.

    I would be using WinPE bootable CD which would give me access to all the drives in admistrator to perform the disc operations.

    I would not like to use some already built command line or GUI applications. I intend to use Win32 APIs and create my application.

    Also is there any way using some specified functions to know totals directories on the partition whose data needs to be erased and how much time it will take to remove the data.
    Kavitesh Singh

  2. #2
    Join Date
    Nov 2003
    Posts
    1,902

    Re: Disc and File Management functions.

    >> I would not like to use some already built command line or GUI applications.
    Why? Diskpart does almost everything that you need to do already. And it's been tested. You can always write your own front end and let diskpart do the work in the background.

    gg

  3. #3
    Join Date
    Dec 2008
    Location
    Xi'an China
    Posts
    27

    Re: Disc and File Management functions.

    Following functions may be useful

    GetLogicalDrives
    GetDriveType
    FindFirstVolume
    FindFirstVolumeMountPoint
    FindNextVolume
    FindNextVolumeMountPoint
    GetVolumeInformation
    Life is similar to ....., if you cannot resist it, you should relax and enjoy it.

  4. #4
    Join Date
    Mar 2006
    Posts
    12

    Re: Disc and File Management functions.

    Quote Originally Posted by Codeplug View Post
    >> I would not like to use some already built command line or GUI applications.
    Why? Diskpart does almost everything that you need to do already. And it's been tested. You can always write your own front end and let diskpart do the work in the background.

    gg
    Well i would have used this program but then i couldnot find any option to use Diskpart to populate the disc information.

    And for me option is to delete data on the disc and not format it. I doubt diskpart would let me do that.
    Kavitesh Singh

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