mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-10-26 16:22:04 +01:00 
			
		
		
		
	LazFileUtils: fix compilation of GetShellLinkTargetAnsi for fpc 2.6.2.
git-svn-id: trunk@47324 -
This commit is contained in:
		
							parent
							
								
									bc7b2a12c3
								
							
						
					
					
						commit
						d38d2f788b
					
				| @ -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; | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 bart
						bart