>AFAIK, NTFS shouldn't be a problem. However, tracking down what the problem is is difficult without seeing two things. First, the declaration and call. Second, the value returned by the GetLastError() API function. If you'll post these, maybe we can figure out what's going on.
Hi George, thanks for your answer, here you have the code:
FUNCTION DISKSERIAL
LPARAMETERS lpRootPathName
LOCAL lpVolumeNameBuffer, nVolumeNameSize, lpVolumeSerialNumber
LOCAL lpMaximumComponentLength, lpFileSystemFlags
LOCAL lpFileSystemNameBuffer, nFileSystemNameSize
IF PCOUNT() = 0
lpRootPathName = SYS(5)
ENDIF
lpVolumeNameBuffer = SPACE(256) && lpVolumeName return buffer
nVolumeNameSize = 256 && Size of/lpVolumeNameBuffer
lpVolumeSerialNumber = 0 && lpVolumeSerialNumber buffer
lpMaximumComponentLength = 256
lpFileSystemFlags = 0
lpFileSystemNameBuffer = SPACE(256)
nFileSystemNameSize = 256
DECLARE INTEGER GetVolumeInformation IN Win32API AS GetVolInfo ;
STRING @lpRootPathName, ;
STRING @lpVolumeNameBuffer, ;
INTEGER nVolumeNameSize, ;
INTEGER @lpVolumeSerialNumber, ;
INTEGER @lpMaximumComponentLength, ;
INTEGER @lpFileSystemFlags, ;
STRING @lpFileSystemNameBuffer, ;
INTEGER nFileSystemNameSize
RetVal=GetVolInfo(@lpRootPathName, @lpVolumeNameBuffer, ;
nVolumeNameSize, @lpVolumeSerialNumber, ;
@lpMaximumComponentLength, @lpFileSystemFlags, ;
@lpFileSystemNameBuffer, nFileSystemNameSize)
RETURN lpVolumeSerialNumber
Yes, I tested again and you're right, there is no problem with NTFS, the problem is with net volumes (if I map a volume of other user or the WinNT Server)
Do you have any solution?
Thanks in advance.