>George,
>
>I have written a little program to test the results of the declaration that you gave me and I just cannot get it to work. Here is my code, can you tell what is wrong?
>
>declare integer GetShortPathName in Win32API string @lpszLongPath, string @lpszShortPath, integer cchBuffer
>
>lnSize = 100
>lcBuffer = Space(lnSize)
>lcFile = PutFile([Save file as:], [], [wav])
>lnResult = GetShortPathName(@lcFile, @lcBuffer, lnSize)
>?Left(lcBuffer, lnResult)
>
>return
>
>lnResult is always 0
>lcBuffer is remains at space(100)
Though I didn't play too much with API, I think you should
lnResult = GetShortPathName(@lcFile, @lcBuffer, @lnSize)
?Left(lcBuffer, lnSize)
?Left(lcBuffer,at(chr(0), lcBuffer)-1)
Try this before the real API gurus wake up :)