load the dll in exactly the same way (by using LoadLibrary on Windows).
The only difference (afaik) in the loading of the dll is in *when* it happens. If you
then the loading is done at script compile-time (whenever the compilation process gets to that compile-time command).
then the loading is done at script run-time (whenever the execution process gets to that run-time command).