LazFileUtils: fix compilation of GetShellLinkTargetAnsi for fpc 2.6.2.

git-svn-id: trunk@47324 -
This commit is contained in:
bart 2015-01-09 01:17:36 +00:00
parent bc7b2a12c3
commit d38d2f788b

View File

@ -286,14 +286,17 @@ begin
end;
function GetShellLinkTargetAnsi(const FileName: string): string;
{$if (fpc_fullversion >= 20604)}
var
ShellLinkA: IShellLinkA;
PersistFile: IPersistFile;
WideFileName: WideString;
AnsiPath: array [0 .. MAX_PATH] of Char;
WinFindData: WIN32_FIND_DATAA;
{$endif}
begin
Result := FileName;
{$if fpc_fullversion >= 20604}
if (LowerCase(ExtractFileExt(FileName)) = '.lnk') then
begin
if (CoCreateInstance(CLSID_ShellLink, nil, CLSCTX_INPROC_SERVER,
@ -312,6 +315,7 @@ begin
end;
end;
end;
{$endif}
end;