Using DLL in script...

Using the example from the user manual:



function MessageBox(hwnd: pointer; text, caption: string; msgtype: integer): integer; stdcall; external 'User32.dll' name 'MessageBoxA';



in a script.



I tried SelfRegisterAsLibrary(engine) and it complied without error.



In another script:



MessageBox(null,'text','caption',0);          <-OK

MessageBoxA(null,'text','caption',0);          <-Failed compile



I used SelfRegisterAsLibrary(engine, 'CustomDLL') and it complied without error.



In another script:



CustomDLL.MessageBox(null,'text','caption',0);     <-Failed compile

CustomDLL.MessageBoxA(null,'text','caption',0);     <-Failed compile