I am trying to use an external DLL function from a 3rd party supplier but am not sure what Value type to use.
Both the return value and the parameters to be set are specified by the DLL supplier as being string, boolean or integer.
String is OK
If I read the manual correctly the boolean is entered with no type or quotes
Which value type do I use for an integer?
The function being called has 7 parameters and returns an integer
file=string
key=string
moduleID=string
name=String
User=Boolean
Quit=Boolean
Tag=String
A sample line of java code looks like this:
mytest res = testfunction(location, readKey, "QHD001", "", true, false, tag);
Here is my interpretation within Opus. The DLL loads fine, its the function call that gives a NULL result.
var MyDLL = LoadDLL( SYSTEM_PUBLICATION_DIR + "mytest.dll" );
readkey="abc123"
location=SYSTEM_PUBLICATION_DIR+"demofile.fil"
if (MyDLL)
{
test_return = MyDLL.CallFn("testfunction",false,"sshort","string",location,"string",readkey,"string","DQH001","none","",false,false,"string","tagvar");
Debug.trace(test_return); // this gives a NULL return
If I break this down this is what I think I am requesting:
test_return = MyDLL.CallFn // call the function from MyDLL
("testfunction", //the function is called testfunction
false, // there is no screen element
"sshort", //The return value will be of the type sshort
"string",location, // location is a string held in a variable
"string",readkey, //readkey is a string held in a variable
"string","DQH001", //DQH001 is a string
"none","", // this value is not required and is null
false, // this value is boolean false
false, // this value is boolena false
"string","tagvar"); //this value is text
Can anyone help me make sense of this?????
|