Windows NT ( 2)




- 7


break;

case 3:

ltoa(lpDiskInfo->dwMaxFileNameLength, szBuf, 10);

lpLvdi->item.pszText = szBuf;

break;

case 4:

ltoa(lpDiskInfo->dwTotalSpace, szBuf, 10);

lpLvdi->item.pszText = szBuf;

break;

case 5:

ltoa(lpDiskInfo->dwFreeSpace, szBuf, 10);

lpLvdi->item.pszText = szBuf;

break;

default:

break;

}

break;

}

}

case NM_DBLCLK:

{

int index;

char szBuf[256];

//

index = ListView_GetNextItem(hwndList,

-1, LVNI_ALL | LVNI_SELECTED);

if(index == -1)

return 0;

//

GetVolumeInformation((pdi + index)->szDriveName,

(pdi + index)->szVolumeName, 30,

&((pdi + index)->dwVolumeSerialNumber),

&((pdi + index)->dwMaxFileNameLength),

&((pdi + index)->dwFileSystemFlags),

(pdi + index)->szFileSystemName, 10);

//

//

GetDiskFreeSpace((pdi + index)->szDriveName,

&dwSectors, &dwBytes, &dwFreeClusters, &dwClusters);

(pdi + index)->dwFreeSpace =

dwSectors * dwBytes * dwFreeClusters;

(pdi + index)->dwTotalSpace =

dwSectors * dwBytes * dwClusters;

// ,

// ,

//

sprintf(szBuf, "System flags for drive %s (%s)\n"

"Serial number: %lX\n",

(pdi + index)->szDriveName,

(pdi + index)->szFileSystemName,

(pdi + index)->dwVolumeSerialNumber);