DllFunction.Init

Prototypes

void Init( String sFileName, String sFuncName, int nNumArgs )

Parameters

String sFileName
The filename of the DLL. If the filename extension is omitted, the extension .DLL is appended. If the filename does not specify a path, the DLL will be located according to the rules of the Windows LoadLibrary function.

String sFuncName
The name of the function as it appears in the DLL's export table. IMLPlus uses this string when calling the Windows GetProcAddress function.

int nNumArgs
The number of parameters expected by the function.

Remarks

This method enables you to specify basic information about the function you want to call. When you call this method, IMLPlus checks to see whether the DLL has already been loaded. If it has not, IMLPlus uses the Windows LoadLibrary function to load the DLL.

The DLL remains mapped into IML Studio's address space until you exit IML Studio. If you are the author of the DLL, this implies that you cannot rebuild the DLL once you have loaded it with IML Studio. To rebuild the DLL you must exit IML Studio so the DLL file is no longer in use.

The function may use either the __cdecl or the __stdcall calling convention.

Example
declare DllFunction func = new DllFunction();
func.Init( "MyCode.dll", "Calculate", 4 );