Friday, November 06, 2009

Delphi 5 on Windows 7

Delphi 5 may seem like an ancient tool nowadays, but some of us need to use it. Here are some pitfalls of running Delphi on Windows 7:

1. Delphi fails to compile a project with a type library (*.tlb file) with the following error:

[Error] RLINK32: Error opening file: "...tlb"
The message is in fact misleading, since the TLB file itself is perfectly accessible. Monitoring the compilation process with Sysinternal's Process Monitor revelead that Delphi tries to write a temporary file named dfwtemp.tlb to its bin folder (under Program Files), which under Windows 7 is not permitted unless you run Delphi as administrator.

To resolve the problem, grant full access on Delphi bin folder to the Users local group.

2. Windows 7 no longer opens old help files (hlp extension). For some reason Microsoft decided not to include WinHlp32.exe anymore, even though the one from Windows XP works perfectly. To be precise, there IS a file named WinHlp32.exe in Windows directory, but it DOES NOT open HLP files; instead it shows a message that this functionality is no longer available.

To read Deplhi's HLP files (or any other HLP files), copy winhlp32.exe from an XP computer to Windows directory. This is not going to be easy though, since Windows 7 is very fussy about overwriting anything in Windows directory. To overwrite the existing dummy file (which is owned by a pseudo-user TrustedInstaller), first take ownership of it, then grant yourself full access, then copy the file "as administrator".

Post a Comment