>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)
>
>Thanks
>
>DJ :o)
Since you're using PUTFILE() (I assumed it was GETFILE()), it's probably because the file name specified doesn't exist. Everthing is correct in the declaration and the call.
George
Ubi caritas et amor, deus ibi est