Type Library Import utility
Original Reporter info from Mantis: ludob
-
Reporter name: Ludo Brands
Original Reporter info from Mantis: ludob
- Reporter name: Ludo Brands
Description:
Attached is a TL import utility for fpc. It accepts .tlb, .dll, .exe and .olb files.
Usage:
importtl inputfile
The utility will create the bindings for inputfile as well as all its dependencies, provided the dependencies are installed on the computer. The inputfile does not have to be installed.
The typelib to binding functionality has been separated into a separate unit to ease eventual integration in an IDE. importtl is a simple sample wrapper for the typelib unit.
Additional information:
The utility has been tested against a few COM servers. Problems encountered at this stage (alpha!):
- Some bindings don't compile since the ActiveX unit is missing a lot of interfaces/types that are in the Delphi ActiveX units. The missing interfaces I encountered so far are IFont, IPicture found in stdole2. If stdole2 is a dependency, it will be imported also for the time being causing other types to be not found (OLE_XSIZE_HIMETRIC, OLE_XPOS_HIMETRIC, ..., from OLECTL.H) and re-definition of IUnknown and IDispatch. I see only one solution: add missing definitions to ActiveX.pas and not import stdole2 (Delphi style).
- no support yet for the vt_carray olevariant type.
Mantis conversion info:
- Mantis ID: 20958
- OS: windows
- Platform: i386
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 19890 (#f98a2cba)
- Monitored by: » @mdbs99 (Marcos Douglas), » @PascalDragon (Sven Barth)
- Target version: 3.0.0