many thanks for your code! The function GetLinkTarget() is exactly what I was looking for.
Although the code is rather old, it seems to work almost flawlessly here on my system with the current PB version 5.73 LTS on Windows 10.
But because newer PB versions always create Unicode programs, two lines have to be changed:
In both codes that you posted, replace
Code: Select all
Target$ = PeekS(*Buffer + *LinkInfo\LocalBasePathOffset)
Target$ + PeekS(*Buffer + *LinkInfo\CommonPathSuffixOffset)
Code: Select all
Target$ = PeekS(*Buffer + *LinkInfo\LocalBasePathOffset, -1, #PB_Ascii)
Target$ + PeekS(*Buffer + *LinkInfo\CommonPathSuffixOffset, -1, #PB_Ascii)
Thanks again!