I am thinking about a kind of Plugin System to extend the Script-functions
without recompiling the Application.
My Idea is, during the startup, the programm scans a folder and registers
all found DLLs.
(Each DLLs exposes one Function).
As it is not known in which DLL a function is defined, I can not use
Function FindWindow(c1, c2: PChar): Cardinal; external 'FindWindow@user32.dll stdcall';
which is in one of the PascalScript-examples.
May somebody has any Ideas how to achieve this?
Greetings - Klaus
The typical approach with plugin DLLs is that each DLL exports the same function name. Then the host program knows what function to call when it's loaded.
In your case, for example, your application could pass that function a reference to the Pascal Script interpreter, and then the DLL could use it to register whatever script functions the DLL provides.