Hello George,
You would use WinSDK calls to return disk drive information and properties. The attached code returns the physical drives on your computer and their types. If you would like more in depth specs on your drives, take a look at the
example program provided by Microsoft. This program returns adapter and device properties.
------------------------------>
#include windows.h>
#include ansi_c.h>
#include stdio.h>
#include cvirte.h>
int main (int argc, char *argv[])
{
char szBuffer[MAX_PATH+100];
int nDrive;
DWORD dwLogicalDrives = GetLogicalDrives();
for ( nDrive = 0; nDrive<32; nDrive++ )
{
if ( dwLogicalDrives & (1 << nDrive) )
{
UINT uType;
/* Get disk information.*/
sprintf(szBuffer, "%c:\\", nDrive+'A' );
uType = GetDriveType(szBuffer);
/* display information.*/
sprintf(&szBuffer[3], " Id: %u, Type: %s ", uType,
(uType == DRIVE_REMOVABLE) ? "FLOPPY" :
((uType == DRIVE_FIXED) ? "HARD DISK" :
((uType == DRIVE_REMOTE) ? "NETWORK" :
((uType == DRIVE_CDROM) ? "CDROM" :
(uType == DRIVE_RAMDISK) ? "RAMDISK" :
((uType == 1) ? "DOES NOT EXIST" :
"UNKNOWN DRIVE TYPE" ))))));
printf("%s\n", szBuffer);
}
}
if (InitCVIRTE (0, argv, 0) == 0)
return -1; /* out of memory */
return 0;
}
------------------------------>
Good luck!
Wendy L
LabWindows/CVI Developer Newsletter