To load a DLL called "MyDLL.dll" and access a function from it which is called Test, does not require an interface and will return a signed long integer which goes directly into a new variable called MyValue:
var MyDLL = LoadDLL( SYSTEM_PUBLICATION_DIR + "MyDLL.dll" );
if (MyDLL)
{
MyValue = MyDLL.CallFn("Test", false, "signed long");
}
To load a Windows system DLL called "User32.dll".
The function displays a standard Windows message box. Note that the style of the message box is one of several inbuilt styles provided by User32 and is specified by the long integer, 48.
var UserDLL = LoadDLL( SYSTEM_WINSYS_DIR + "User32.dll");
if (UserDLL)
{
UserDLL.CallFn( "MessageBoxA", true, "slong", "long", 0, "string", "This is a message box!", "string", "This is the title", "long", 48 );
}