LoadDLL

Syntax:

LoadDLL( Filename )

Return:

An object that allows access to the functions within the DLL for example:

var MyDLL=LoadDLL("MyFunctions.dll")

Will make the functions contained in MyFunctions.dll in the MyDLL object so they can be accessed using CallFn as a function of that object for example:

MyDLL.CallFn(Function, HasDisplay, Return, params)

If the DLL could not be loaded the return is null. It is therefore good practice to test that a DLL opened before calling its functions by placing the function calls within an If statement for a DLL called MyDLL this takes the syntax:

if (MyDLL)

{

function calls

}

A sample publication, together with a test DLL, is provided with Opus to allow you to see this in action.

Parameters:

Filename – The full filename of the DLL to load. This parameter is required.

Remarks:

This function loads a DLL to allow functions within external Dynamic Link Libraries (DLLs) to be called from OpusScript. DLLs provide a way to perform more complex data operations that may be possible from OpusScript.

Note:
The DLL must export the functions as standard undecorated C calling convention functions.

Note:
It is only possible to use DLLs from standard Opus executable publications – they cannot be used on the web or from Flex publications.

image\Script_Button.jpgExamples