Can someone tell me the API calls I need to:
Find the target of a .lnk file (those shortcuts)
Create a .lnk file
I'm new to API but I'm learning! Thx for any help
Everytime
Printable View
Can someone tell me the API calls I need to:
Find the target of a .lnk file (those shortcuts)
Create a .lnk file
I'm new to API but I'm learning! Thx for any help
Everytime
Function PathFile(z$) As String
Open z$ For Binary As #1
s$ = Input$(LOF(1), #1)
Close
Do While s$ <> ""
i$ = Mid$(s$, 1, InStr(s$, Chr$(0)) - 1)
If InStr(i$, ":\") Then
If InStr(1, i$, "#") = 0 Then PathFile = i$: Exit Do
End If
s$ = Mid$(s$, InStr(s$, Chr$(0)) + 1)
Loop
End Function
Private Sub Command1_Click()
'Mettre le chemin du raccourci ici :
z$ = ""
MsgBox PathFile(z$)
End Sub
Thanks to int19h (forum VBfrance) for his help.