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:
Basic Volume information
Detecting changes in connections to removable drives (VFP9)
Disk in drive A:
Enumerating Volumes and Volume Mounting Points (NTFS)
GetVolumeInformation
..msdn    Add comment     W32 Constants      Translate this page
Retrieves information about a file system and volume whose root directory is specified.
Code examples:
Detecting changes in connections to removable drives (VFP9)
Enumerating Volumes and Volume Mounting Points (NTFS)
Disk in drive A:
Basic Volume information
Declaration:
 
BOOL GetVolumeInformation(
  LPCTSTR lpRootPathName,           // root directory
  LPTSTR lpVolumeNameBuffer,        // volume name buffer
  DWORD nVolumeNameSize,            // length of name buffer
  LPDWORD lpVolumeSerialNumber,     // volume serial number
  LPDWORD lpMaximumComponentLength, // maximum file name length
  LPDWORD lpFileSystemFlags,        // file system options
  LPTSTR lpFileSystemNameBuffer,    // file system name buffer
  DWORD nFileSystemNameSize         // length of file system name buffer
);
 
FoxPro declaration:
 
DECLARE SHORT GetVolumeInformation IN kernel32;
    STRING    lpRootPathName,;
    STRING  @ lpVolumeNameBuffer,;
    INTEGER   nVolumeNameSize,;
    INTEGER @ lpVolumeSerialNumber,;
    INTEGER @ lpMaximumComponentLength,;
    INTEGER @ lpFlags,;
    STRING  @ lpFileSystemNameBuffer,;
    INTEGER   nFileSystemNameSize
 
 
Parameters:
lpRootPathName
[in] Pointer to a string that contains the root directory of the volume to be described.

lpVolumeNameBuffer
[out] Pointer to a buffer that receives the name of the specified volume.

nVolumeNameSize
[in] Specifies the length, in TCHARs, of the volume name buffer.

lpVolumeSerialNumber
[out] Pointer to a variable that receives the volume serial number.

lpMaximumComponentLength
[out] Pointer to a variable that receives the maximum length, in TCHARs, of a file name component supported by the specified file system.

lpFileSystemFlags
[out] Pointer to a variable that receives flags associated with the specified file system.

lpFileSystemNameBuffer
[out] Pointer to a buffer that receives the name of the file system (such as FAT or NTFS).

nFileSystemNameSize
[in] Specifies the length, in TCHARs, of the file system name buffer.
Return value:
If all the requested information is retrieved, the return value is nonzero.
My comment:
If you are attempting to obtain information about a floppy drive that does not have a floppy disk or a CD-ROM drive that does not have a compact disc, the system displays a message box asking the user to insert a floppy disk or a compact disc, respectively. To prevent the system from displaying this message box, call the function with SEM_FAILCRITICALERRORS.

With this function you can check "no-disk" status of a floppy drive or CD-ROM drive, and long filenames support on a volume.
Word Index links for the GetVolumeInformation :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
•
Created: 2001-08-10 12:00:00
Modified: 2002-01-26 11:51:00
Visited in last 7 days: 75
User Contributed Notes:
Danilo Freire | 2005-06-27 18:11:54
It doesn΄t work under windows98. How may I run it under windows 98 ?
81.22.82.147 | 2006-03-25 15:19:10
when i run it with deplhi it work
but in foxpro

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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.91.38.173)
10 sec.Function: 'HeapCompact'
19 sec.Function: 'JetRetrieveColumn'
28 sec.Function: 'InternetAutodial'
39 sec.Function: 'AVIStreamGetFrame'
49 sec.
Function group: 'Window Class'
1 min.Function: 'TaskDialog'
1.18 min.Function: 'AVIFileRelease'
1.4 min.Function: 'EndUpdateResource'
1.65 min.Function: 'FillRect'
1.92 min.Function: 'StrTrim'
Google
Advertise here!