Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetVolumeInformation returns 0 with NTFS
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00272024
Message ID:
00272643
Vues:
29
>>
>>Hi Pablo,
>>
>>I've tried on a Novell
>
>Still works! (grin)
>>
>>SYS(5) returns the current default drive without a back slash. Making this call to a local FAT 32 drive using SYS(5) failed. GetLastError() returned 87 (ERROR_INVALID_PARAMETER). However, it worked when I used ADDBS(SYS(5)). So try adding the back slash.
>
>This wasn't a problem cause I passed always K:\, but I changed the code
>with:
>
>IF PCOUNT() = 0
> lpRootPathName = ADDBS(SYS(5))
>ELSE
> lpRootPathName = LEFT(lpRootPathName, 1) + ":\" && backslash and :
>ENDIF
>
>Still don't work, the problem I think is a net volume of a shared directory, if you don't have access to a server try this:
>
>1. share a folder (ie: AAA)
>2. from MSDOS issue:
>
> NET USE M: \\myipaddress\AAA
>ie:
> NET USE M: \\192.168.77.1\AAA
>
>(now you have a shared folder)
>
>3. ? DISKSERIAL("M:\")
>
>and you get 0.
>
Hi Pablo,

About the best I can do is to ask what GetLastError() returns in this situation and to quote the MS Win 32 SDK about the parameter that specifies the drive. So...

"lpRootPathName
Points to a string that contains the root directory of the volume to be described. If this parameter is NULL, the root of the current directory is used. If this parameter is a UNC name, you must follow it with an additional backslash. For example, you would specify \\MyServer\MyShare as \\MyServer\MyShare\."

All this indicates to me that it should work with NTFS and that the function is supported on NT.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform