Thema: Delphi Component From Dll

Einzelnen Beitrag anzeigen

Medium

Registriert seit: 23. Jan 2008
3.679 Beiträge
 
Delphi 2007 Enterprise
 
#5

Re: Component From Dll

  Alt 17. Mai 2008, 18:33
You might be able to let a DLL create an object and use in your host (named pipes, clipboard, WM_COPYDATA), and maybe even reroute the logic of a class to the DLL, but you will always need at least an empty prototype of that class declared in the namespace of your application to access methods and fields/properties. There might even be a way to write your own little "RTTI", with which you could do this for arbitrary structures, but as this term already indicates: This wouldn't have too much in common with objects/classes in the common sense.
Further more, to attempt this for already existing classes, you would have to essentially rewrite them, or at least modify them heavily. What will never work is, that you could install them as actual "components", so that you could move and edit these inside the Delphi IDE.

Maybe COM/ActiveX can take you there, but again, heavy modifications will probably be neccessary, and since I'm not too familiar with these, I don't know whether there are serious downsides while using them.

In any case, this will result in a more or less dirty hack
"When one person suffers from a delusion, it is called insanity. When a million people suffer from a delusion, it is called religion." (Richard Dawkins)
  Mit Zitat antworten Zitat