Hello Boris,
I am not referring to what George is telling you. The API you're working on won't work. It only recognizes local drives. We bought third party tool to do more or less the same functionality for us. We integrate it into our system and works well. Unless you have the time to do R & D on this (in relation to what George is telling), try on Protection Plus. It works with network drives although not returning the serial number but it returns a unique no. enough to achieve the same functionality that we want.
>>Hi,
>>I use the WIN32 API function GetVolumeInformation to get serial number of the disk where my application have been instaled. But when the application is installed on network drive this function always returns 0 as a serial number.
>>
>>Here is my code:
>>
>>WAIT WINDOW STR(GetVolumNum("P")) && 0
>>WAIT WINDOW STR(GetVolumNum("C")) && 7444123 - disk serial number
>>
>>
>>FUNCTION GetVolumNum
>>
>> LPARAMETERS driv_lett
>> DECLARE GetVolumeInformation IN WIN32API AS GetVolume;
>> STRING @DriveLett, STRING @VolumName, INTEGER VolumSize,;
>> INTEGER @VolumNumb, INTEGER @FileLen, INTEGER @SysFlags,;
>> STRING @FileType, INTEGER FileSystemLen
>>
>> LOCAL m_drv, m_getdrv, nvolum, xxvolum, asd
>> DECLARE mm_plus[2]
>> mm_plus[1] = ":"
>> mm_plus[2] = "\"
>> FOR asd = LEN(driv_lett) TO 2
>> driv_lett = driv_lett + mm_plus[asd]
>> NEXT
>> m_getdrv = SPACE(256)
>> nvolum = 256
>> xxVolum = 0
>> GetVolume(@driv_lett,@m_getdrv,@nVolum,@xxVolum,0,0,"",0)
>>
>>RETURN xxVolum
>>
>>
>>TIA
>>
>Hi Boris,
>
>This is a known issue with Win95/98. See MS KB article Q234741. It also provides a workaround in VC++. I haven't looked at the code closely enough to know whether or not it could be successfully translated into VFP.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net
CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."