Groups > Borland > Borland C plus plus builder Active X > Re: BCB2007 Show Stopper: Initialization of VCL and ActiveX Componentin




BCB2007 Show Stopper: Initialization of VCL and ActiveX
Component

BCB2007 Show Stopper: Initialization of VCL and ActiveX Component
Sun, 22 Jul 2007 10:02:37 +020
We are porting an Application from BCB5 to BCB2007.

The problem we face with the VCL under BCB2007 only appears with
an ActiveX component placed on a Form.

When we try to call the form the debugger stops with a
non continuable exception somewhere in the creation Code
of the Form for the placed ActiveX component.

What we do is probably a little bit uncommon but
works fine for BCB5.

We are using the BCB Part of our application from a foreign
application by using an interface DLL with a C interface.

We placed all forms we use in DLLs and create them also within
the DLLs.

Now, if we try to use the form with the ActiveX component
we get the exception during form creation (TForm constructor) .
The rest of the forms works fine !

We found, that if we use a BCB2007 console application with
VCL to call our interface and use Application.Initialize()
then it works !!!!!

This was not necessary with BCB5 for our application!

We tried to use Application.Initialize() within the DLLs
Entrypoint.

This leads to a stop somewhere in the grounds of the run-time.
A common experience now - by the way.

We get the same error if we create the form
within the vcl console exe (no DLL) without
Application.Initialize().

After running through all permutations we face here a show
stopper. There is no VCL based exe that could do the init of the
VCL. So we can't use BCB2007 for now.

We found nothing about this problem.

We have tried things like using dynamic and static run-time, etc.

Has anyone an idea what could be done. Otherwise we have to
give up the port for now.

Thanks for all suggestions and help in advance

Thomas




Post Reply
Re: BCB2007 Show Stopper: Initialization of VCL and ActiveX Componentin
Sun, 22 Jul 2007 13:33:51 +020
Thomas wrote:
> 
> We found nothing about this problem.

We found something in the delphi area:

Call of CoInitialize[Ex] etc. with the enum for ApartmenThreaded.

We placed it in the main Interface DLL in our own system init
and shutdown routines (not the DLLentry methods !!).

This solves the problem for the first.

But it is definitely a different behavior than for BCB 5.

But were should we place this correctly, so that it
is a stable solution ?

Thanks

Post Reply
about | contact