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; | end; | ||||||
| 
 | 
 | ||||||
| function GetShellLinkTargetAnsi(const FileName: string): string; | function GetShellLinkTargetAnsi(const FileName: string): string; | ||||||
|  | {$if (fpc_fullversion >= 20604)} | ||||||
| var | var | ||||||
|   ShellLinkA: IShellLinkA; |   ShellLinkA: IShellLinkA; | ||||||
|   PersistFile: IPersistFile; |   PersistFile: IPersistFile; | ||||||
|   WideFileName: WideString; |   WideFileName: WideString; | ||||||
|   AnsiPath: array [0 .. MAX_PATH] of Char; |   AnsiPath: array [0 .. MAX_PATH] of Char; | ||||||
|   WinFindData: WIN32_FIND_DATAA; |   WinFindData: WIN32_FIND_DATAA; | ||||||
|  | {$endif} | ||||||
| begin | begin | ||||||
|   Result := FileName; |   Result := FileName; | ||||||
|  |   {$if fpc_fullversion >= 20604} | ||||||
|   if (LowerCase(ExtractFileExt(FileName)) = '.lnk') then |   if (LowerCase(ExtractFileExt(FileName)) = '.lnk') then | ||||||
|   begin |   begin | ||||||
|     if (CoCreateInstance(CLSID_ShellLink, nil, CLSCTX_INPROC_SERVER, |     if (CoCreateInstance(CLSID_ShellLink, nil, CLSCTX_INPROC_SERVER, | ||||||
| @ -312,6 +315,7 @@ begin | |||||||
|       end; |       end; | ||||||
|     end; |     end; | ||||||
|   end; |   end; | ||||||
|  |   {$endif} | ||||||
| end; | end; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 bart
						bart