I can import a type library via tlibimp.exe, but when I open up the IDE, the libraries are not in the activex pallete. I can’t seem to figure how to get it to install to a particular package either. In the IDE there is an install button in the Import Type Library dialog. How do I do this in the command line?
When I look in at the OCX.cpp file generated by tlibimp in the CBuilder5\Imports folder, I see "Errors: Error creating palette bitmap of (TTVBH3D) : No Server registered for this CoClass". Does this have something to do with the problem?
Edit:
I want to be able to install components to the activex palette without going through the IDE so that the process can be automated during a build. Any solutions must be able to be fully automated.
First, run tlibimp.exe (found under Program Files\Borland\C++Builder\Bin) with the ocx\dll you want to install.
Second, locate the cpp file generated by tlibimp (you can specify the output path with tlibimp) and find the string ‘Servers’ at the bottom of the file and replace it with ‘ActiveX’. This string determines the palette to install to. I’m not sure if this can be specified with tlibimp, but it doesn’t look like it.
Next, compile the package that contains type library\activex component.
Finally, add a key to the registry. The key goes under HKCU\Software\Borland\C++Builder\5.0\Knownpackages. The name of the key should be the path to package that you just compiled (for example, $(BCB)\Bin\applet50.bpl).
When you open up BCB, you will see the components under the activex palette.
This is the only way I could find to do this that could be automated.