Board index » cppbuilder » Wrong method being called when using Delphi-created VCL in C++ 5

Wrong method being called when using Delphi-created VCL in C++ 5

I have a component that works as expected in Delphi.   When I try to use the
same component in C++ Builder 5, some methods are mapped incorrectly.  For
example, I call a method named "Something" and it traces into
"SomethingElse".  I actually set a break point on the "Something" method,
click on trace into and end up in the "SomethingElse" method.

Can anyone shed some light?

 

Re:Wrong method being called when using Delphi-created VCL in C++ 5


Maybe there is a mismatch between ordinal numbers. Functions of a dynamic
library (DLL for example) may be addressed by a so called ordinal number. The
application using the library of course needs to know about these numbers. A
library file containing the numbers is linked to the application. Maybe this
library file containing the ordinals does not match the dynamic library which
may explain getting the wrong functions.

If the dynamic library is a DLL, you can build an import library using implib
(implib <file.lib> <file.dll>).

Hope it helps.

Ronald

Quote
Garfield wrote:
> I have a component that works as expected in Delphi.   When I try to use the
> same component in C++ Builder 5, some methods are mapped incorrectly.  For
> example, I call a method named "Something" and it traces into
> "SomethingElse".  I actually set a break point on the "Something" method,
> click on trace into and end up in the "SomethingElse" method.

> Can anyone shed some light?

Re:Wrong method being called when using Delphi-created VCL in C++ 5


Maybe there is a mismatch between ordinal numbers. Functions of a
dynamic library (DLL for example) may be addressed by a so called
ordinal number. The application using the library of course needs to
know about these numbers. A library file containing the numbers is
linked to the application. Maybe this library file containing the
ordinals does not match the dynamic library which may explain getting
the wrong functions.

If the dynamic library is a DLL, you can build an import library using
implib (implib <file.lib> <file.dll>).

Hope it helps.

Ronald

Quote
Garfield wrote:

> I have a component that works as expected in Delphi.   When I try to use the
> same component in C++ Builder 5, some methods are mapped incorrectly.  For
> example, I call a method named "Something" and it traces into
> "SomethingElse".  I actually set a break point on the "Something" method,
> click on trace into and end up in the "SomethingElse" method.

> Can anyone shed some light?

Re:Wrong method being called when using Delphi-created VCL in C++ 5


Are both two method virtual fucntion?

"Garfield" <hope...@palmsoft.com> D????D???:3cbc2652_1@dnews...

Quote
> I have a component that works as expected in Delphi.   When I try to use
the
> same component in C++ Builder 5, some methods are mapped incorrectly.  For
> example, I call a method named "Something" and it traces into
> "SomethingElse".  I actually set a break point on the "Something" method,
> click on trace into and end up in the "SomethingElse" method.

> Can anyone shed some light?

Re:Wrong method being called when using Delphi-created VCL in C++ 5


Yes, they are virtual methods.
Quote
"Lan Qiang" <l...@hanwang.com.cn> wrote in message

news:3cc4ca22$1_1@dnews...
Quote
> Are both two method virtual fucntion?

> "Garfield" <hope...@palmsoft.com> D????D???:3cbc2652_1@dnews...
> > I have a component that works as expected in Delphi.   When I try to use
> the
> > same component in C++ Builder 5, some methods are mapped incorrectly.
For
> > example, I call a method named "Something" and it traces into
> > "SomethingElse".  I actually set a break point on the "Something"
method,
> > click on trace into and end up in the "SomethingElse" method.

> > Can anyone shed some light?

Other Threads