Nupur:

API to find free disk space is...

Declare Function GetDiskFreeSpace Lib "kernel32" Alias _
  "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, _
               lpSectorsPerCluster As Long, _
             lpBytesPerSector As Long, _
             lpNumberOfFreeClusters As Long, _
             lpTtoalNumberOfClusters As Long) As Long


So I would create a function like...

Function FindDiskSpace(ByVal sRootPathName As String,
            lnFreeDiskSpace As Long,
            lnTotalDiskSpace As Long) As Boolean

   Dim lnSectorsPerCluster As Long
   Dim lnBytesPerSector As Long
   Dim lnNumberOfFreeCluster As Long
   Dim lnTotalNumberOfClusters As Long

   If GetDiskFreeSpace(sRootPathName, _
          lnSectorsPerCluster, _
          lnBytesPerSector, _
          lnNumberOfFreeCluster, _
          lnTotalNumberOfCluster) Then

      lnFreeDiskSpace = lnSectorsPerCluster * lnNumberOfFreeCluster
      lnTotalDiskSpace = lnSectorsPerCluster * lnTotalNmberOfCluster
      FindDiskSpace = True
   End If 

End Function


I am not sure exactly what to expect from SectorsPerCluster part.

Hope this helps

Yas


 ----------
From:  Nupur Jain
Sent:  Monday, March 8, 1999 5:39 PM
To:  Yas NaKayama
Subject:  Re: MI Get the cdrom drive from vb

Hi Yas!

Do you know of any Windows API to check free disk space?

Nupur

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to