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:
00161841
Views:
33
>>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.
Hi George,

Tks
It work's fine but under Window NT 4 with long names
The lcBuffer gives a name with a tilde char.


c:\anulkid7a.doc -> c:\anulki~1.Doc

IF FILE("c:\anulki~1.Doc") <<- Return .F. Thats my new problem.

Marcel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform