[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'LazFileUtils' (#lazutils)

GetShellLinkTarget

Resolves a Shell Link to the file path for the shortcut.

Declaration

Source position: lazfileutils.pas line 140

function GetShellLinkTarget(

  const FileName: string

):string;

Arguments

FileName

  

Shell Link shortcut file to resolve in the routine.

Function result

Path to the Shell object for the link.

Description

GetShellLinkTarget is a String function used to resolve the Shell Link file in the FileName parameter to a path on the local system. The return value contains the qualified path to the Shell object in the Link file.

Shell links are a feature available in Windows desktop and server operating systems. It relies on the Shell Object namespace, and provides access to files, folders, disk drives and printers on the system. The Shell Link allows access to an object from anywhere in the Shell namespace, and does not need to know the current name and / or location for the object.

GetShellLinkTarget is implemented for UNIX-like platforms and Amiga, but simply returns the value in the FileName parameter.

The Windows CE platform does not have the IShellLinkW interface; the value in FileName is always used as the return value.

FileName must contain a file name that uses the .lnk file extension, as created using the Create Shortcut option in Windows Explorer. No actions are performed in the routine when FileName does not use the .lnk file extension; the return value contains the original value passed in the FileName parameter.

GetShellLinkTarget uses the IShellLinkW interface to resolve the Shell Link to the path for the Shell object.


Version 3.2 Generated 2024-02-25 Home