Search code examples
delphicomtypelibcom-hell

Delphi and COM: TLB and maintenance issues


In the company that i work, we develop all the GUI in C#, but the application kernel is mainly developed in Delphi 5 (for historical reasons), with a lot of components made in COM+. Related to this very specific sort of application a I two questions:

  • Experienced guys in Delphi and/or COM, do you have any workrounds to work with the buggy TLB interface ? Some of the bugs are: IDE crashing during edition of a large TLB, lost of methods IDs, TLB corruption, etc. Here, we haven't found any good solution. Actually we tried do upgrade do the new 2007 version. But the new IDE TLB interface has the same bugs that we found before.

  • How do you control TLBs versions ? The TLB file is in a binary format and conflict resolutions are very hard to do. We tried to do it exporting the interfaces descriptions to IDL and commiting into CVS, but we didn't found any good way to generate TLBs from IDL using Delphi. Additionaly, the MIDL tool provided by Microsoft, didn't parse correctly the IDL files that we exported from delphi.


Solution

  • I think you should have a good look at Delphi 2009.

    Delphi 2009 has changes to the COM support, including a text-based replacement for the binary TLB files.

    You can read more on Chris Bensen's blog.