0
[id(0x00000002), helpstring("method ReadFromFile")]
VARIANT ReadFromFile(
            [in] BSTR FilePath,
            [out] FileStatus* status);

I want to call this function from ActiveX control.

but need to pass "writable pointer" to the function.

This is the question:

How could i pass a argument to function using javascript ?

Is that possible ?

osmund sadler
  • 1,021
  • 2
  • 15
  • 27
  • What is "writable pointer"? This method takes path and returns one way data backwards filling the `status` variable. – Roman R. Sep 07 '14 at 06:56
  • Microsoft's Javascript COM binding doesn't support `[out]` parameters. You can still call the method, and you will get its return value (where, presumably, the actual data from the file is reported), but you can't obtain `status` value. – Igor Tandetnik Sep 07 '14 at 14:22
  • @RomanR. i mean the second parameter of ReadFromFile. – osmund sadler Sep 07 '14 at 16:16
  • @IgorTandetnik Thanks. This answer close to what i wanted to do. but i can't reach to the start address of function(when debugging) because of C++ exception(e06d7363). what kind of argument should i pass to it ? any ideas ? – osmund sadler Sep 07 '14 at 16:22
  • Try passing nothing, just calling it with one string parameter. If that doesn't work, try an empty object, `{}`. – Igor Tandetnik Sep 07 '14 at 16:32
  • @IgorTandetnik ok, both methods are not working. Maybe vbscript could possible ?. i have no idea. – osmund sadler Sep 07 '14 at 17:08
  • You can return an object in `[out, retval]` parameter, which in turn would offer properties for data (`VARIANT`) and status (`FileStatus`). – Roman R. Sep 07 '14 at 17:33

0 Answers0