DataFlex
DataFlex
Get the Target of a Windows Shortcut
See more FileAccess Examples
Demonstrates how to get the target of a Windows shortcut.Note: This example requires Chilkat v9.5.0.77 or greater.
Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoFac
String sTargetPath
Boolean bTemp1
Get Create (RefClass(cComCkFileAccess)) To hoFac
If (Not(IsComObjectCreated(hoFac))) Begin
Send CreateComObject of hoFac
End
Get ComSymlinkTarget Of hoFac "qa_data/my_shortcut" To sTargetPath
Get ComLastMethodSuccess Of hoFac To bTemp1
If (bTemp1 <> True) Begin
Showln "Failed to get shortcut target."
Procedure_Return
End
Showln "target path = " sTargetPath
End_Procedure