I have a VB6 kernal func which returns free space as a long, but the max val for a long is 2.1 meg and I have 140 gig free. Is there a func or sub that returns free space as currency? Current func follows:
------------------------------------------------------------------------------------------------------
Private Declare Function GetDiskFreeSpaceEx Lib "kernel32" Alias "GetDiskFreeSpaceExA" (ByVal lpRootPathName As String, lpFreeBytesAvailableToCaller As Currency, lpTotalNumberOfBytes As Currency, lpTotalNumberOfFreeBytes As Currency) As Long
Public Function GetFreeSpace(pDrive As String) As Currency
Dim curTotalBytes As Currency
Dim curFreeBytesToCaller As Currency
Dim curTotalFreeBytes As Currency
Call GetDiskFreeSpaceEx(pDrive, curFreeBytesToCaller, curTotalBytes, curTotalFreeBytes)
GetFreeSpace = curTotalFreeBytes
End Function
Software/Hardware used:
ASKED:
May 11, 2009 8:12 PM
UPDATED:
May 12, 2009 2:38 PM