Imagine this procedure, which is callable in a script:
// Foo is not implemented in the Script but via Delphi
procedure Foo(ClassType: TClass);
The Script looks like that:
type
TMyClass = class
end;
Foo(TMyClass);
When Foo gets called my Delphi App sees an Int64-Value for the ClassType.
e.g. Foo(661259635);
You can see in the DWS sources that a TClass
is explicitly converted to an Int64
(see dwsCompiler.pas, procedure TObjectClassTypeMethod.Execute -> Info.ResultAsInteger := Int64(info.ValueAsClassSymbol[SYS_SELF]);
).
Now in which structure I can search for that number to find the corresponding TdwsClass?
Note: In fact TMyClass is not implemented in the script, but created exposed via the Delphi App...I don't know if this makes a difference.