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:
Enumerating Volumes and Volume Mounting Points (NTFS)
GetVolumePathNamesForVolumeName
..msdn    Add comment     W32 Constants      Translate this page
Retrieves a list of path names for the specified volume name.
Code examples:
Enumerating Volumes and Volume Mounting Points (NTFS)
Declaration:
BOOL GetVolumePathNamesForVolumeName(
    LPCTSTR lpszVolumeName,
    LPTSTR lpszVolumePathNames,
    DWORD cchBufferLength,
    PDWORD lpcchReturnLength
);

FoxPro declaration:
DECLARE INTEGER GetVolumePathNamesForVolumeName IN kernel32;
    STRING lpszVolumeName,;
    STRING @lpszVolumePathNames,;
    LONG cchBufferLength,;
    LONG @lpcchReturnLength
Parameters:
lpszVolumeName
[in] Pointer to a string that specifies the volume name.

lpszVolumePathNames
[out] Pointer to a buffer that receives the list of null-terminated volume path names.

cchBufferLength
[in] Length of the lpszVolumePathNames buffer, in TCHARs.

lpcchReturnLength
[out] If the call is successful, this parameter is the number of TCHARs copied to the lpszVolumePathNames buffer.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
lpcchReturnLength -- allocate large buffer and rely on AT(Chr(0)+Chr(0), cBuffer) rather than on this parameter.

nBufsize=0
cBuffer = REPLICATE(CHR(0), 0x4000)

GetVolumePathNamesForVolumeName(;
        "\\?\Volume{9da9a070-8130-11d6-bb8f-806d6172696f}\",;
        @cBuffer, LEN(cBuffer), @nBufsize)

cBuffer = SUBSTR(cBuffer, 1, AT(CHR(0)+CHR(0), cBuffer))
* returns "A:\"
Word Index links for the GetVolumePathNamesForVolumeName :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2005-12-18 08:30:34
Modified: 2005-12-18 08:39:20
Visited in last 7 days: 17
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.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.227.127.109)
17 sec.
Function group: 'Error Handling'
34 sec.Function: 'InsertMenuItem'
50 sec.Function: 'CoTaskMemFree'
1.1 min.Function: 'CreateDirectory'
1.37 min.Function: 'StrToIntEx'
1.63 min.Function: 'CreateJobObject'
1.92 min.Function: 'WaitForSingleObject'
2.2 min.Function: 'GetSystemPowerStatus'
2.48 min.Function: 'ClipCursor'
2.78 min.Function: 'if_nametoindex'
Google
Advertise here!