Using Win32 functions in Visual FoxPro Image Gallery
File System
..msdn
DeleteVolumeMountPoint
FindFirstVolume
FindFirstVolumeMountPoint
FindNextVolume
FindNextVolumeMountPoint
FindVolumeClose
FindVolumeMountPointClose
GetCompressedFileSize
GetDiskFreeSpace
GetDiskFreeSpaceEx
GetFileSize
GetFileSizeEx
GetLogicalDrives
GetLogicalDriveStrings
GetVolumeInformation
GetVolumeNameForVolumeMountPoint
GetVolumePathNamesForVolumeName
SetVolumeLabel
SetVolumeMountPoint
Code examples:
Detecting changes in connections to removable drives (VFP9)
Disk in drive A:
Obtaining physical parameters for a drive: sectors, clusters, cylinders...
GetDiskFreeSpace
..msdn    Add comment     W32 Constants      Translate this page
[Obsolete] Retrieves information about the specified disk, including the amount of free space on the disk.
Code examples:
Detecting changes in connections to removable drives (VFP9)
Obtaining physical parameters for a drive: sectors, clusters, cylinders...
Disk in drive A:
Declaration:
BOOL GetDiskFreeSpace(
  LPCTSTR lpRootPathName,          // root path
  LPDWORD lpSectorsPerCluster,     // sectors per cluster
  LPDWORD lpBytesPerSector,        // bytes per sector
  LPDWORD lpNumberOfFreeClusters,  // free clusters
  LPDWORD lpTotalNumberOfClusters  // total clusters
);
FoxPro declaration:
DECLARE SHORT GetDiskFreeSpace IN kernel32;
    STRING lpRootPathName,;
    INTEGER @ lpSectorsPerCluster,;
    INTEGER @ lpBytesPerSector,;
    INTEGER @ lpNumberOfFreeClusters,;
    INTEGER @ lpTotalNumberOfClusters
Parameters:
lpRootPathName
[in] Pointer to a null-terminated string that specifies the root directory of the disk to return information about.

lpSectorsPerCluster
[out] Pointer to a variable for the number of sectors per cluster.

lpBytesPerSector
[out] Pointer to a variable for the number of bytes per sector.

lpNumberOfFreeClusters
[out] Pointer to a variable for the total number of free clusters on the disk that are available to the user associated with the calling thread.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
The GetDiskFreeSpace function cannot report volume sizes that are greater than 2 GB. To ensure that your application works with large capacity hard drives, use the GetDiskFreeSpaceEx function.
Word Index links for the GetDiskFreeSpace :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-08-13 12:00:00
Modified: 2004-09-09 18:38:45
Visited in last 7 days: 26
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.166.203.76)
4 sec.Function: 'CreateCompatibleDC'
6 sec.Function: 'MAPIResolveName'
10 sec.Function: 'CryptGetDefaultProvider'
13 sec.Function: 'CloseEventLog'
16 sec.Function: 'WSAWaitForMultipleEvents'
19 sec.Function: 'GdipNewInstalledFontCollection'
22 sec.Function: 'MAPIResolveName'
25 sec.Function: 'GetMenuItemID'
29 sec.Function: 'SQLGetDiagRec'
32 sec.Function: 'WSASend'
Google
Advertise here!