Irwin Scollar wrote:
> Referring to:
> 
> Robert Meek's note:
> 
> Old components for which one has no source code:
> 
> Is there any objection to using an earlier version of Delphi with 
> these components for which one has applicable dcu's and putting them 
> into a dll as a container which can be called from D10? If not, what 
> are the limitations?

Besides being a major pain the neck?

DLLs can't export Delphi classes. (They can't really export C++ classes, 
either, but Visual C++ tries to make it happen anyway.) DLLs only export 
functions. In your DLL, you'd need to have a separate standalone 
function for each publically accessible method of the object. You'll 
also need special functions for the component's constructors and destructor.

Then, on the receiving end, you'll be stuck with just a bunch of 
functions -- no object anymore, and definitely not anything you can drop 
on a form at design time.

> Can one also do this with ActiveX controls?

That might actually work. Use the old version of Delphi to generate an 
ActiveX control out of the component, and then import the ActiveX DLL 
into the new version of Delphi. I expect it will be a 
less-than-satisfying experience, but if you've lost the source code for 
your old components, this is probably the only way to make any use of 
the compiled code.

-- 
Rob
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to