Board index » delphi » BDS 2006: Borland Office XP Servers Package

BDS 2006: Borland Office XP Servers Package


2006-05-04 03:31:46 AM
delphi30
Hello,
it's not possible to use the package in both IDEs,
Delphi and C++Builder. Why? Any workaround?
Due to the nature of the problem I have crossposted
my question.
Thanks and greetings
Udo
 
 

Re:BDS 2006: Borland Office XP Servers Package

Hi,
Quote
it's not possible to use the package in both IDEs,
Delphi and C++Builder. Why?
Those packages are the result of importing the Office servers
via tlibimp.exe. Tlibimp.exe has switches to produce pascal
code or C++ code. The generated code makes assumptions about
the framework and the means of "doing COM" in that framework.
For example: VCL in the case of pascal, and ATL+VCL+VCL Com
Emulation (e.g. Variants support) in the case of C++.
So this situation is quite different than when a pascal
package can be compiled to generate C++ headers and OBJ's.
Quote
Any workaround?
The BDS.EXE -r switch enables the use of an alternate
registry setting for the IDE. To use -r, copy
the Windows Start item for BDS to create a new shortcut.
Then go to the new shortcut's properties and add the
parameter -r<AnyNameHere>
e.g. the property for Target might look like:
"C:\Program Files\Borland\BDS\4.0\Bin\bds.exe" -rCppServers
Run the IDE using that shortcut and customize that IDE
for your preferred packages. Then in RegEdit you can
confirm that a new Registry entry has been created
by the IDE:
HKEY_CURRENT_USER\Software\Borland\CppServers\
--Craig
 

Re:BDS 2006: Borland Office XP Servers Package

Hello Craig,
first of all thank you for your answers!
Quote
>it's not possible to use the package in both IDEs,
>Delphi and C++Builder. Why?

Those packages are the result of importing the Office servers
via tlibimp.exe. Tlibimp.exe has switches to produce pascal
code or C++ code. The generated code makes assumptions about
the framework and the means of "doing COM" in that framework.
For example: VCL in the case of pascal, and ATL+VCL+VCL Com
Emulation (e.g. Variants support) in the case of C++.
So this situation is quite different than when a pascal
package can be compiled to generate C++ headers and OBJ's.
During installation, you will be asked whether the Borland Office
XP Servers Package becomes installed in the Delphi or C++Builder
IDE. I selected C++Builder because I work more with C++Builder.
Now I am looking for the command line parameters, so that I can
compile the package for Delphi with tlibimp.exe. Any hint?
Thanks in advance.
Udo
 

Re:BDS 2006: Borland Office XP Servers Package

Hi,
Quote
During installation, you will be asked whether the Borland Office
XP Servers Package becomes installed in the Delphi or C++Builder
IDE. I selected C++Builder because I work more with C++Builder.
The installer places all of the pre-built packages on disk
regardless of your initial install-time IDE pre-install choice.
They can all be found in the ..\bin and named as follows:
dcloffice2k100.bpl
dclofficexp100.bpl
bcboffice2k100.bpl
bcbofficexp100.bpl
The version installed into the IDE can be configured at
any time via Component | Install Packages.
In this list of installed design pacakges you will
see e.g. "Microsoft Office XP Sample Automation Server Wrapper
Components" when the dclofficexp100.bpl package is installed.
You will see "Microsoft Office 2000 Sample Automation Server Wrapper
Components" when the dcloffice2k100.bpl package is installed.
You can change the currently installed version at any time by
removing one and adding another (by browsing to it is location
in the ..\bin directory).
Quote
Now I am looking for the command line parameters, so that I can
compile the package for Delphi with tlibimp.exe. Any hint?
If the pre-built ones are not for the exact version you want
then you can always import a type library for any other
version of Microsoft Office, add the type library import
to a package and install that package into the IDE.
Because of likely duplicate component names, it is
recommended that you first remove the currently installed
Microsoft Office design package first.
A sample tlibimp.exe command line is:
tlibimp -c- -p+ -ha+ -hs+ -Ya+ -Hr+ -HpsServers -FtWordXP -feXP
"c:\program files\microsoft office\office10\msword.olb"
--Craig
 

Re:BDS 2006: Borland Office XP Servers Package

Hello again Craig,
Quote
>it's not possible to use the package in both IDEs,
>Delphi and C++Builder. Why?

Those packages are the result of importing the Office servers
via tlibimp.exe. Tlibimp.exe has switches to produce pascal
code or C++ code. The generated code makes assumptions about
the framework and the means of "doing COM" in that framework.
For example: VCL in the case of pascal, and ATL+VCL+VCL Com
Emulation (e.g. Variants support) in the case of C++.
So this situation is quite different than when a pascal
package can be compiled to generate C++ headers and OBJ's.
I know one component supplier, whose MS Office COM (wrapper)
components work in both IDEs. Voodoo?
BTW, I am the guy who published QC Report #29661.
Thanks for any comment and greetings
Udo