Is there a way in Delphi 7 to generate a tlb from an idl? Or even from a class/ interface definition?
Asked
Active
Viewed 2,392 times
2 Answers
2
you can use the IDL2PAS.bat
batch file (check in this location C:\Program Files\Borland\Delphi7\Bin) or the MIDL.exe
application.

RRUZ
- 134,889
- 20
- 356
- 483
-
1? I was under the impression that IDL2PAS.bat generates the stubs and skeletons for Visibroker specific clients and servers. The midl.exe gives an error that cl.exe can not be found. – Asher Feb 24 '11 at 06:07
-
-
-
1
1
In Delphi 7 one of the easiest ways is to copy/paste the IDL into the Type Library editor source window. NOT the *_TLB.pas source unit 'behind' the type library, but the type library editor itself.
I don't have D7 to hand right now, but iirc you may have to set the "Type Library Language" option in the IDE settings to IDL rather than Pascal. And I also seem to recall that this technique could be sensitive to "exotic" IDL (i.e. didn't always work), but if the IDL in question is relatively straightforward, this may work for you.

Deltics
- 22,162
- 2
- 42
- 70