Board index » delphi » Problem passing derived class to DLL

Problem passing derived class to DLL

Hello,

I've the following problem:
An application uses an DLL.
Both use 2 classes:
TBase = class
TDerived = class(TBase)

In application I create an TDerived en pass this as TBase to the DLL.
Then 'if TBase is TDerived then' results in false, but property ClassName
says 'TDerived'
What can I do?

Eelco Mulder,
EMulder#Ravelin.NL

 

Re:Problem passing derived class to DLL


You have to pass it as it's derived class.
Quote
Eelco Mulder wrote:
> Hello,

> I've the following problem:
> An application uses an DLL.
> Both use 2 classes:
> TBase = class
> TDerived = class(TBase)

> In application I create an TDerived en pass this as TBase to the DLL.
> Then 'if TBase is TDerived then' results in false, but property ClassName
> says 'TDerived'
> What can I do?

> Eelco Mulder,
> EMulder#Ravelin.NL

Other Threads