Click to See Complete Forum and Search --> : Disc and File Management functions.


kavitesh
December 23rd, 2008, 05:14 AM
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.

Codeplug
December 23rd, 2008, 07:50 AM
>> 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

Fireseed
December 23rd, 2008, 09:48 PM
Following functions may be useful

GetLogicalDrives
GetDriveType
FindFirstVolume
FindFirstVolumeMountPoint
FindNextVolume
FindNextVolumeMountPoint
GetVolumeInformation

kavitesh
December 23rd, 2008, 10:34 PM
>> 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.