>>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