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:
00160714
Views:
19
>Hi George,
>
>Tks for you last reply about Icon's.
>I am here again with another question
>
>I want to get the name and path of the Anulkid7a.rtf from the Shortcut in the foll. example.
>I always receive a empty string ?
>I try it with VFP6 and NT4
>
>Kindly advise .
>
>Check code ---------------------------------------
>
>DECLARE INTEGER GetLinkArgs IN LNKFILES.DLL;
> INTEGER hWnd, STRING @lpszLinkName, STRING @lpszArguments
>DECLARE INTEGER GetLinkDescription IN LNKFILES.DLL;
> INTEGER hWnd, STRING @lpszLinkName, STRING @lpszPath
>
>
>* 260 is the current value of MAX_PATH
>lcbuffer = SPACE(260)
>lclinkfile = "c:\temp\80879608\Shortcut to Anulkid7a.rtf.lnk"
>
>IF FILE(lcLinkFile)
>
> * lclinkfile is the file name of the link file
>-> 0 lnresult = GetLinkArgs(0, @lclinkfile, @lcbuffer)
> lcargs = LEFT(lcbuffer, lnresult)
>
>-> 0 lnresult = GetLinkDescription(0, @lclinkfile, @lcbuffer)
> lcdescription = LEFT(lcbuffer, lnresult)
>
>ENDIF
>
>RETURN

Hi Marcel,

The description is essentially the same as the file name, so that isn't a problem. If I understand your question correctly, you should be using GetCmndLineInfo() to return the name and location of the file. I assume that you're relying on Windows to start the appropriate application and the shortcut points directly to the file.

hth,
George

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

Click here to load this message in the networking platform