Hi Phil If you're using components, you could used Delphi streaming to write the component and then pass the string to the DLL. Then read the component from the string stream inside the DLL to recreate it.
Todd. ----- Original Message ----- From: "Phil Middlemiss" <[EMAIL PROTECTED]> To: "NZ Borland Developers Group - Delphi List" <[EMAIL PROTECTED]> Sent: Wednesday, September 08, 2004 6:50 PM Subject: Re: [DUG] Passing Objects to a DLL > Thanks Max, I thought it was something like that, but didn't know the > specifics. BPL's are out of the question for us... we looked at that and > ruled it out earlier since the versioning nightmare is even worse than with > DLL's. Is the BPL the only way around it? > > Cheers, > Phil. > ----- Original Message ----- > From: "Max Nilson" <[EMAIL PROTECTED]> > To: "'NZ Borland Developers Group - Delphi List'" <[EMAIL PROTECTED]> > Sent: Wednesday, September 08, 2004 5:07 PM > Subject: RE: [DUG] Passing Objects to a DLL > > > > Phil Middlemiss asks: > > > > > When an object is passed to a DLL it comes across fine and all > properties > > and > > > methods can be accessed, but somehow the class information gets handled > > > differently. Using the "is" comparison fails when it should work - even > > > InheritsFrom doesn't work. We've got around this in the past by using a > > > recursive routine to compare class/ancestor names but I'm beginning to > > wonder > > > if there is a trick that I have missed somewhere. > > > > > Can anyone shed any light on this? > > > > Class type comparisions are done using the VMT tables that are generated > for > > each class. When you compile a DLL a separate copy of the VMT's are linked > > in, leading to the situation that App.TFoo <> Dll.TFoo. > > > > Borland fixed this problem when the add their BPL libraries (in Delphi 5 I > > think?), as these have the knowledge built in to allow then to reference > the > > calling applications VMT's. > > > > Simple solution then it to use BPL rather than DLL packaging technology. > > > > Cheers, Max. > > > > > > > > > > _______________________________________________ > > Delphi mailing list > > [EMAIL PROTECTED] > > http://ns3.123.co.nz/mailman/listinfo/delphi > > _______________________________________________ > Delphi mailing list > [EMAIL PROTECTED] > http://ns3.123.co.nz/mailman/listinfo/delphi _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
