Domino Code Fragment

Code Name*
32 bit free disk space funtion call In Windows to check Freespace on Disk.
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.128.199.210
Description*
Returns Freespace on C: Drive
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Declarations:
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


Sub Initialize
    Dim FreeDiskSpace As Long
    Dim SectorsPerCluster As Long
    Dim BytesPerSector As Long
    Dim NumberOfFreeClusters As Long
    Dim TotalNumberOfClusters As Long
   
    FreeDiskSpace = GetDiskFreeSpace ("c:\",SectorsPerCluster, _
    BytesPerSector, NumberOfFreeClusters, TotalNumberOfClusters)
   
    FreeDiskSpace = SectorsPerCluster * BytesPerSector _
    * NumberOfFreeClusters    
   
   
    Messagebox  "Free Hard Disk Space = " & Str(Freediskspace)
End Sub