views:

455

answers:

4

I'm trying to automate a build, but the instructions require openning an OCX in Borland C++ Builder and saving it as a TLB. How can I reproduce this process through the command line?

A: 

Did you look at the help for the IDE command line or the other tools/executables?

Tim
A: 

If I recall, you can use tlbimport. I will admit it's been a long time, and tlbimport may have been part of the VC++ redist.

Robert S.
A: 

It's not the nicest solution, but it's the only one I can find that works automatically. I downloaded a free program called AutoHotkey to emulate the keystrokes for openning the ocx file in BCB5, checking off the 'Can Create' checkbox under the Flags tab and saving the file as a tlb. It helps get through the annoying translation warning as well!

Everett
+1  A: 

With Delphi/C++Builder 2009, you can use the TLIBIMP and GENTLB command line tools:

  1. 1. tlibimp -I comdlg32.ocx -Ftcomdlg32
    This will generate a comdlg32.ridl file (RIDL is a variant of Microsoft's IDL).
  2. 2. gentlb comdlg32.ridl
    This generates the comdlg32.tlb file.
Moritz Beutel