Call C DLL from js
The code ive tried this far is like this:
function testsDLLCall()
{
var Def_Enviroment, Def_DLL, pointerdatareply;
var LpStr, Lib;
Def_Enviroment = DLL.DefineEnvironmentByDLL("ddwrapper.dll");
Def_DLL = Def_Enviroment.DefineDLL("ddwrapper.dll");
Def_DLL.DefineProc("getDataInt", VT_LPSTR ,VT_BYREF | VT_PTR);
LpStr = Def_Enviroment.New("LPSTR", 256);
LpStr.Text = "Signalname";
Lib = Def_Enviroment.Load("C:/TestCompleteMain/MainProject/ddwrapper.dll");
Lib.getDataInt(LpStr, pointerdatareply);
}
The routine in the .h file:
//
// Routine to get int signal from DD
// signalName: Name of signal on DD (or dd_alias-name)
// result: 0 if value exist, -1 if not initialized on DD
// returns value of DD signal
//
DD_WRAPPER_API int getDataInt(char* signalName, int* result);
The error i get in TestComplete is 'Wrong number of arguments or invalid property assignment'.
Can anyone help me with the declaration and function call?