When you import a type library in any version of Delphi it will generate a series of interfaces, constants, and wrappers. This is great but it will always place nearlythe same list of units in the
interface uses clause. This will typically look like this "
uses Windows, ActiveX, Classes, Graphics, OleCtrls, OleServer, StdVCL, Variants;" Depending on what you are using the imported type library for this list creates references that will bloat your application, especially if it is a server side program.
You can clean up this list by removing all but "
uses Windows, ActiveX;" and the unit should still remain complete but you have removed many dependencies that you don't need. The resulting executable, if it isn't already dependent on the graphics and OLE support will be much smaller. On occassion, you will need to include
OleCtrls if the imported control has events and you care about dropping the control on a form or data module.
Labels: Delphi