RIDL File
Go Up to Using Delphi or RIDL Syntax
A new file type has been added to the COM architecture for 2009 - the RIDL file (Restricted Interface Definition Language). The RIDL file is the storage mechanism that the project uses to persist the type library data to disk. RAD Studio now uses the .tlb
file as an intermediate file (like a .res
, .dcu
, .obj
, and so forth). This means that you can rebuild the .tlb file from the command line (outside the IDE), that .tlb files can be edited with a text editor, and the history is stored by the IDE.
The Type Library Editor now works on top of a text file (the RIDL file) instead of the binary .tlb file.
This change means that:
- You no longer have to check in the binary .tlb file, because the build-system can generate it from the latest .RIDL file.
- Multiple programmers can work on the type library at the same time and then simply merge their changes to the text RIDL file. (Binary files cannot be merged, requiring that the last person always overwrites previous changes.)
The RIDL format offers more flexibility for certain constructs than the Type Library Editor. For example, with a RIDL file you can add and edit custom data on any type, function, or member. You can describe complex types such as safe arrays of safe arrays. You can easily perform diff's of RIDL files and gain insight into the evolution of the model exposed by a server over time.
During a build, the RIDL file is compiled using the new type library generator, GenTLB.exe, to generate the binary .tlb file.