Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LNKFILES.DLL
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00160686
Message ID:
00160850
Views:
25
>Hi George,
>
>Tks for your reply
>
>What I try to do is to get the linked file Name (and path) from the shortcut file.
>
>It work's fine with GetFile(), but I don't want a user prompt .
>
>So I try to do it with your LNKFILES.DLL but I seem's not possible for a document file ( only for exe ? ).
>
>Perhaps I can do it with a windows API ( commondlg ) without user prompt ?
>
Hi Marcel,

As I mentioned in my previous reply GetCmndLineInfo() will return the value you're looking for. The following should work just fine:
DECLARE INTEGER GetCmndLineInfo IN LNKFILES.DLL;
  INTEGER hWnd, STRING @lpszLinkName, STRING @lpszPath
* 260 is the current value of MAX_PATH
lcbuffer = SPACE(260)
* lclinkfile is the file name of the link file
lnresult = GetCmndLineInfo(0, @lclinkfile, @lcbuffer)
lccmndline = LEFT(lcbuffer, lnresult)
Please let me know if there's a problem.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform