Cannot Open Type Library Errors in Delphi5 on Windows7

Yet another gotcha with Windows7 and older applications.  I was trying to compile one of my ActiveX controls with Delphi5 on my new Windows7 machine and the link was failing with “Cannot open file: myapp.tlb” errors.  It turns out that if Delphi5 doesn’t have write access to the directory where it is installed it won’t work.  Since the security on Windows7 is much tighter than previous versions of Windows the Program Files\Borland\Delphi5 directory was write protected.  Granting “full control” to everyone solved the problem, at the risk of slightly decreased security.

Leave a Reply