Click to See Complete Forum and Search --> : Retreiving drive geometry using Win32 API


pistole
June 18th, 2001, 11:13 AM
Hi All,

I'm trying desperately to find functions to retreive the _physical_ geometry from a disk under Win9x and WinNT/Win2k

Anyone got any ideas? GetDiskFreeSpaceEx is not an option - that gives information on a _logical_ drive

Thanks!

KoWind7
June 18th, 2001, 07:24 PM
What language are you using? And do you want the drives geometry, or what the bios has it set as. These can and often are different.

pistole
June 18th, 2001, 11:25 PM
I'm using MS Visual C++ (6.0sp5) and would like to retreive the information how just like in System Information (msinfo32.exe)

Thanks!

KoWind7
June 19th, 2001, 10:10 AM
I'm not a C++ guru, but I'll see if I can find anything tonight.

pistole
June 19th, 2001, 10:13 AM
thanks alot! I'm not a C guru as well (I have sleepless night because of these pointers to references to strings ... <IMG SRC="smilies/mad.gif" border="0"> )

Deity
June 20th, 2001, 01:37 PM
LOL! I feel your pain. We've all been at that place in our programming career. I'll see if I can come up with any info for you as well.

Deity
June 20th, 2001, 02:09 PM
I found this on MSDN. I assume you've seen it too... http://msdn.microsoft.com/library/psdk/winbase/filesio_4lf7.htm

I believe that System Information collects its info from several of these functions, not just one. From what I see, GetDiskFreeSpace, GetDiskFreeSpaceEx, and GetDriveType are the functions used.

This is another list of functions used for System Information... http://msdn.microsoft.com/library/psdk/sysmgmt/sysinfo_8stv.htm

I'll keep searching though, might be able to come up with more.