Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WINMM.DLL and Saving File Names
Message
 
To
05/09/2001 01:06:28
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00552081
Message ID:
00552425
Views:
20
>Though I didn't play too much with API, I think you should
>
lnResult = GetShortPathName(@lcFile, @lcBuffer, @lnSize)
>?Left(lcBuffer, lnSize)
>* or
>?Left(lcBuffer,at(chr(0), lcBuffer)-1)
>
>Try this before the real API gurus wake up :)

No luck on this either. I just can't seem to make it work. Here is a more simple approach to the application that didn't work either.

DECLARE INTEGER GetShortPathName IN Win32API STRING, STRING, INTEGER

lcLongFile = "c:\program files\somefolder\my file name.doc"
lcBuffer = SPACE(511)
lnBufferSize = 511
lnShortPathLen = GetShortPathName(lcLongFile, @lcBuffer, lnBufferSize)

lcShortPath = LEFT(lcBuffer, lnBufferSize)

MessageBox(lcShortPath,16,[Test])

return
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform