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".

4 comments:

André said...

Eu estava tendo o problema com o RLINK32 no Delphi 7 e, concedendo permissão na pasta Delphi7 -> Bin consegui compilar o projeto! ;)
Obrigado!
____________________________________
I was having trouble with RLINK32 in Delphi 7 and granting permission to the folder Delphi7 -> Bin could compile the project! ;)
Thanks!

MoNarch Enterprises said...

Thank you very much. I still have some Delphi 5 software which I need to convert to something newer. But until I do, I am glad that you told me about this issue. I would have spent hours trying to figure it out otherwise. You are a lifesaver (well a timesaver at least).

cynicalSection said...

Brilliant Leonid! Solved the problem with Delphi 7 on Windows 8.

cynicalSection said...

Brilliant Leonid! Solved the problem with Delphi 7 on Windows 8.