
result = DLL.Load("\cedll.dll")
IF result == 0
{
result = DLL.CallFn("Fn")
result = DLL.CallFnWithIntParam("FnWithIntData", 1234)
result = DLL.CallFnWithPtrData("FnWithPtrData", result)
result = DLL.CallFnWithResultCode("FnWithResultCode")
number = DLL.GetFnResultCode()
Form.MessageBox("FnWithResultCode returned", number, 0)
result = DLL.CallFnWithIntParamResultCode("FnWithIntDataResultCode", 45600)
number = DLL.GetFnResultCode()
Form.MessageBox("FnWithIntDataResultCode returned", number, 0)
str = "Hello world !"
result = DLL.CallFnWithPtrDataResultCode("FnWithPtrDataResultCode", str)
number = DLL.GetFnResultCode()
Form.MessageBox("FnWithPtrDataResultCode returned", number, 0)
DLL.Unload()
}
ELSE
{
Form.MessageBox("Failed to load DLL", result, 0)
}
Note:
This code segment loads the DLL module and calls a function and checks the result code.