Issue 2: Parameters order when calling activex methods
Status:  Fixed
Owner:
Closed:  Dec 2008
Reported by yauhe...@gmail.com, Dec 19, 2008
Parameters order is incorrect when calling activex method/functions.

For example if in IE I call activex function this way
document.getElementById('Control').function1(par1, par2, par3)
all is working. in ff I should call the same method
document.getElementById('Control').function1(par3, par2, par1)

in order to make it works correctly.
Dec 19, 2008
Project Member #1 leeor.ah...@gmail.com
Thanks for reporting this issue. I will look into it.
Dec 20, 2008
#2 yauhe...@gmail.com
One more question (mostly connected with additional functionality). I am really have 
no expirience in mozilla plugin development (really I am C# developer) but I have no 
choise because of the bad ie performance... Is there is some way to implement such 
logic: plugin checks installed activex component, if there is no installed active x 
component - it goes to specified url (of cab file) and installs it. I have no ideas 
about mozilla object model and its possibilities. As far as I understand your plugin 
code it is very thin plugin. All logic is actually done by mozilla classes. So I 
really don't no have mozilla any permissions to install activex or no. May be you 
have some ideas
Dec 20, 2008
Project Member #3 leeor.ah...@gmail.com
There's no way that I know of to check whether an ActiveX component is installed from
within firefox. You can probably just try to create an instance using this plugin,
and maybe redirect the browser in case that fails.

This is not 100% proof though, and it will need to involve the user in downloading
and installing the ActiveX.

It could be done in native code in the plugin, but it was out of scope, and I don't
have the time to implement it.
Dec 21, 2008
Project Member #4 leeor.ah...@gmail.com
Turns out that I missed the fact that IDispatch->Invoke() requires that the
parameters are passed in reverse order. Fixed now.
Status: Fixed
Dec 21, 2008
Project Member #5 leeor.ah...@gmail.com
A new XPI has been updated with this change.
Dec 22, 2008
#6 yauhe...@gmail.com
Thanks for the fix. ABout installation of activex. When reading sources one more 
time I have found very interesting fragment:
// Do we need to download the control?
if (FAILED(hr) && szCodebase)
{
...
      hr = CoGetClassObjectFromURL(clsid, szURL, dwFileVersionMS, dwFileVersionLS,
            NULL, spBindContext, CLSCTX_ALL, NULL, IID_IUnknown, (void 
**) &m_spObject);
...

I don't know why I haven't seen this fragment when browsing first time. but I think 
this is what I need. We should only expose some parameter (like copdebase) from 
control and transfer it to this class (it accept this parameter in create method). I 
have done such changes and it works for me (it correctly installs cab file to ie 
activex location). Some questions about security of course exists but it works for 
simple cases (may be trusted urls collection should be used).
Dec 22, 2008
Project Member #7 leeor.ah...@gmail.com
Yes, it should be easy to get it working. However, the security issue does concern me
here.

Off the top of my head, I'd say that I would like to have another flag to
allow/disallow downloading of CAB files, and then the URL will need to be verified
against the allowed domains list.

How urgent is this issue? And would you be able to do it and send me a patch? (kind
of busy here with several projects atm).
Dec 22, 2008
#8 yauhe...@gmail.com
for us it is critical. because we have 2 very rich third party plugins that do a lot 
of buisness work. So we need this functionality in ff. I will send you changed 
sources. But I am a C# developer. So my coding style may be not so good :)
Dec 22, 2008
Project Member #9 leeor.ah...@gmail.com
I've committed your changes with the addition of checking the codeBaseURL again the
Trusted Locations list for some extra security (the URL will always be accepted if
the list it empty).

Thanks.
Feb 6, 2009
Project Member #10 leeor.ah...@gmail.com
(No comment was entered for this change.)
Owner: leeor.aharon
Jun 8, 2009
#11 ger...@gmail.com
Latest binary release r2.7 still has wrong events parameters order. In case of
multiple parameters which are handled by event js function, the function parameters
order is backwards comparing to IE.
Jul 6, 2009
Project Member #12 leeor.ah...@gmail.com
Committed a fix for the event handler arguments order to revision 31.