love521u / ff-activex-host

Automatically exported from code.google.com/p/ff-activex-host
0 stars 0 forks source link

Array return values don't get converted to JavaScript #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In JavaScript, call a function on an ActiveX control that return an array

What is the expected output? What do you see instead?
I expect to get a JavaScript array as a return value.  However, no value is 
returned

What version of the product are you using? On what operating system?
Head revision (14e849830355) on Win7

Please provide any additional information below.

I've attached a bugfix for converting a COM array to an NPVARAINT.  
Variant2NPVar switches on the COM Variant type.  Before this fix, VT_ARRAY was 
a case within this switch statement.  Since VT_VARIANT is a flag that is 
combined with the type of the elements (e.g. VT_ARRAY | VT_BSTR for an array of 
BSTRs), the Variant type will never equal VT_ARRAY.  The case will never be 
hit.  The patch changes the function to use a logical AND to determine if we 
are working with an array.  The code that actually does the conversion was 
correct, it just was not being hit.

Original issue reported on code.google.com by mikeyk...@gmail.com on 21 Oct 2011 at 10:52

Attachments:

GoogleCodeExporter commented 8 years ago
Applied the suggested patch. I do not have an ActiveX control I can easily test 
this with, and would appreciate validation.

Thanks.

Original comment by leeor.ah...@gmail.com on 28 Dec 2011 at 10:40