I would like to implement loading functions from external DLL's, in a syntax such as this:
[Dll file="Test.dll"]
external void DoSomething();
Currently, the external keyword requires that the function be defined in a module already before this declaration is compiled (since it's (implicitly?) a shared function), which breaks my ability to get the metadata from CScriptBuilder about the function.
My suggestion is to have a callback function for external functions where I can resolve the function manually, possibly referring it to some asCALL_GENERIC function that handles the dll call.
Perhaps this should be implemented in the CScriptBuilder addon rather than the library itself, since that holds the info on the metadata above the declaration.
Any tips/workarounds would be nice to hear as well.