Board index » cppbuilder » Problem importing in C++ builder an Delphi activeX

Problem importing in C++ builder an Delphi activeX

I developed an ActiveX control using Delphi 4 with Service Pack 3 and I'm
trying to import it in C++ Builder 4...

My control was converted form a VCL component derived from TCustomControl.

While importing, the following errors occur:
[C++ Error] TestXControl1_OCX.h(181): E2113 Virtual function '_fastcall
TTestX::GetControlsAlignment()' conflicts with base class 'TControl'.

[C++ Error] TestXControl1_OCX.h(184): E2113 Virtual function '_fastcall
TTestX::UseRightToLeftAlignment()' conflicts with base class 'TControl'.

The control works fine in Delphi and VB.

Any help would be appreciated.

 

Re:Problem importing in C++ builder an Delphi activeX


Patrice, I suspect that BCB4 and Delphi 4 SP3 have slightly different
signatures for the functions. Can you see that they are identical ? Or
did you create your own functions with these names ? If you did, you
need to change that.

HTH,
Alex

Quote
Patrice Brassard wrote:

> I developed an ActiveX control using Delphi 4 with Service Pack 3 and I'm
> trying to import it in C++ Builder 4...

> My control was converted form a VCL component derived from TCustomControl.

> While importing, the following errors occur:
> [C++ Error] TestXControl1_OCX.h(181): E2113 Virtual function '_fastcall
> TTestX::GetControlsAlignment()' conflicts with base class 'TControl'.

> [C++ Error] TestXControl1_OCX.h(184): E2113 Virtual function '_fastcall
> TTestX::UseRightToLeftAlignment()' conflicts with base class 'TControl'.

> The control works fine in Delphi and VB.

> Any help would be appreciated.

--
HotSend - portable documents technology
http://www.hotsend.com/
eFax - get your faxes via email - Free !
http://www.efax.com

Re:Problem importing in C++ builder an Delphi activeX


: "Patrice Brassard" <patrice.brass...@beltron.com> wrote:

Quote
>I developed an ActiveX control using Delphi 4 with Service Pack 3 and I'm
>trying to import it in C++ Builder 4...

Patrice, last time I answered that (a few months ago), I apparently found
out that

a) the return type of the function is different, hence the compilation
problems

b) you can just change the header declarations of the OCX (because the
binding is via interace entries)

c) I did not understand why one would add a Delphi *ActiveX* control to
BCB, when this can be done natively (just install the PAS files) ;-)

--
Stefan Hoffmeister (TeamB)     http://www.econos.de/
Please do apply judgement when sending email.

Other Threads