I have an ActiveX object that I want to use in a browser (javascript).
There is a function that I want to call. Its prototype:
function TOPOSFiscalPrinter.DirectIO(Command: Integer; var pData: Integer; var pString: WideString): Integer;
Thus, the function returns three values: result code, pData and pString;
In javascript, the function does not update the pData and pString variables;
function test() { var d=1, s="DIRECIO:"; var code = opos.DirectIO(1024, d, s); alert(d); alert(s); }
Variables d and s not updated. They must be d = 0 and s = "ED123456",
How to read data from a function that returns more than one value in javascript?
EDIT
Apparently, Javascript always passes parameters by value, not by reference.
Is there anything I can do to pass values ββby reference in Javascript or will I have to change my design to rely only on the parameters passed in the value and return values.
javascript activex
Stanislav Stoyanov Nov 13 '09 at 23:32 2009-11-13 23:32
source share