Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LNKFILES.DLL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00160686
Message ID:
00160850
Vues:
26
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform