Global code is executed in order of files in project tree.
Every dll extension has register function called:
IDE calls this function when extension is loaded. 'hWnd' parameter is for debugging purposes and should be passed to InitLibAPI function described later.
libapi.lib and libapi.h builds interface between lua extension (dll) and IDE. Now there are three functions in the interface:
Lua standard library extension stdlib.dll has registered Trace(string)
function. You can use it to print messages in debug output window.
Before using any functions from standard library You should load it with:
loadlib("stdlib.dll");
to be continued...