How to import Type via DLL

edited 1:53AM in FastScript
Hi,

i want to register component-types via DLL to use them whitin a script.

i.e my DLL has functions like

ClassType : TClass
and
AncestorClassName : string

After reading the types from my application and registering them with addclass(ClassType, AncestorClassName) they are visible in the fsTreeView.
But using them in a script like TMyDllClass.Create(xxx) nothing appears or "TFont is not assignable with TFont".

Has somebody a hint, what i'm doing wrong?

Thanks a lot

seehauti

Comments

  • edited 1:53AM
    You can't use classes from dll because they have different RTTI. I.e. TFont from main application <> TFont from dll.
  • edited 1:53AM
    Hi Alex,

    thank you for your answer!
    Do you see any other possiblitys to import classes dynamicly?

    Ciao,

    seehauti
  • edited 1:53AM
    No, it's just not possible because IS and AS constructions will not work for different rtti's.

Leave a Comment