Discussion:
QueryService() with IID_ISimpleDOMNode failed with e10s
Rajesh V R
2017-02-22 12:42:16 UTC
Permalink
I am trying to find the URL from Mozilla window using VC++ project. For doing this, I used QueryService() API with parameter IID_ISimpleDOMNode". But the API fails on Windows 7 machines (both 32 bit and 64 bit) with Mozilla Version- 49.0.1. Sample code is given below:


// header files
#include "ISimpleDOMNode.h"
#include "ISimpleDOMText.h"
#include "ISimpleDOMDocument.h"

// GUIDs
const GUID refguid = {0x0c539790, 0x12e4, 0x11cf, 0xb6, 0x61, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8};
const IID IID_ISimpleDOMNode= {0x1814ceeb,0x49e2,0x407f,0xaf,0x99,0xfa,0x75,0x5a,0x7d,0x26,0x07};
const IID IID_ISimpleDOMText= {0x4e747be5,0x2052,0x4265,0x8a,0xf0,0x8e,0xca,0xd7,0xaa,0xd1,0xc0};
const IID IID_ISimpleDOMDocument= {0x0D68D6D0,0xD93D,0x4d08,0xA3,0x0D,0xF0,0x0D,0xD1,0xF4,0x5B,0x24};

Void FindURLfromWindow(HWND hwnd)
{
try
{
if(hwnd)
{
IAccessible *pAccBrowser = NULL;
HRESULT hr = AccessibleObjectFromWindow(hwnd, OBJID_CLIENT, IID_IAccessible, (void**)&pAccBrowser);
if(SUCCEEDED(hr) && (pAccBrowser))
{
VARIANT vtStart;
VARIANT vtResult;
vtStart.vt = VT_I4;
vtStart.lVal = CHILDID_SELF;
/////////////////////////////
hr = pAccBrowser->accNavigate(NAVRELATION_EMBEDS,vtStart,&vtResult);
if(SUCCEEDED(hr))
{
IDispatch *pDisp = vtResult.pdispVal;
IAccessible *pAccDoc = NULL;
hr = pDisp->QueryInterface(IID_IAccessible,(void **)&pAccDoc);
if(SUCCEEDED(hr) && (pAccDoc))
{
hr = pAccDoc->QueryInterface(IID_IServiceProvider, (void **)&pServProv);
if(SUCCEEDED(hr) && (pServProv))
{
ISimpleDOMNode *pNode = NULL;
hr = pServProv->QueryService(refguid, IID_ISimpleDOMNode,(void **)&pNode); //failed in Windows 7
if(SUCCEEDED(hr) && (pNode))
{
ISimpleDOMDocument *pDoc = NULL;
hr = pNode->QueryInterface(IID_ISimpleDOMDocument, (void **)&pDoc);
if(SUCCEEDED(hr) && (pDoc))
{
BSTR bstrUrl = NULL;
hr = pDoc->get_URL(&bstrUrl);
if(SUCCEEDED(hr) && (bstrUrl))
{
//success
}
}
}
}
}
}
}
}
}
catch(...)
{
}
}
//

Kindly help me to solve this issue.
Marco Zehe
2017-02-22 13:26:30 UTC
Permalink
Hello Rajesh,

1. Firefox 49 is outdated.

2. No official version supports accessibility with E10S on in Windows yet. If you need to use accessibility services of any kind, please only use it with E10S off. This is a known problem and won't be fixed in older versions of Firefox.

Marco


Von meinem iPad gesendet
Post by Rajesh V R
// header files
#include "ISimpleDOMNode.h"
#include "ISimpleDOMText.h"
#include "ISimpleDOMDocument.h"
// GUIDs
const GUID refguid = {0x0c539790, 0x12e4, 0x11cf, 0xb6, 0x61, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8};
const IID IID_ISimpleDOMNode= {0x1814ceeb,0x49e2,0x407f,0xaf,0x99,0xfa,0x75,0x5a,0x7d,0x26,0x07};
const IID IID_ISimpleDOMText= {0x4e747be5,0x2052,0x4265,0x8a,0xf0,0x8e,0xca,0xd7,0xaa,0xd1,0xc0};
const IID IID_ISimpleDOMDocument= {0x0D68D6D0,0xD93D,0x4d08,0xA3,0x0D,0xF0,0x0D,0xD1,0xF4,0x5B,0x24};
Void FindURLfromWindow(HWND hwnd)
{
try
{
if(hwnd)
{
IAccessible *pAccBrowser = NULL;
HRESULT hr = AccessibleObjectFromWindow(hwnd, OBJID_CLIENT, IID_IAccessible, (void**)&pAccBrowser);
if(SUCCEEDED(hr) && (pAccBrowser))
{
VARIANT vtStart;
VARIANT vtResult;
vtStart.vt = VT_I4;
vtStart.lVal = CHILDID_SELF;
/////////////////////////////
hr = pAccBrowser->accNavigate(NAVRELATION_EMBEDS,vtStart,&vtResult);
if(SUCCEEDED(hr))
{
IDispatch *pDisp = vtResult.pdispVal;
IAccessible *pAccDoc = NULL;
hr = pDisp->QueryInterface(IID_IAccessible,(void **)&pAccDoc);
if(SUCCEEDED(hr) && (pAccDoc))
{
hr = pAccDoc->QueryInterface(IID_IServiceProvider, (void **)&pServProv);
if(SUCCEEDED(hr) && (pServProv))
{
ISimpleDOMNode *pNode = NULL;
hr = pServProv->QueryService(refguid, IID_ISimpleDOMNode,(void **)&pNode); //failed in Windows 7
if(SUCCEEDED(hr) && (pNode))
{
ISimpleDOMDocument *pDoc = NULL;
hr = pNode->QueryInterface(IID_ISimpleDOMDocument, (void **)&pDoc);
if(SUCCEEDED(hr) && (pDoc))
{
BSTR bstrUrl = NULL;
hr = pDoc->get_URL(&bstrUrl);
if(SUCCEEDED(hr) && (bstrUrl))
{
//success
}
}
}
}
}
}
}
}
}
catch(...)
{
}
}
//
Kindly help me to solve this issue.
_______________________________________________
dev-accessibility mailing list
https://lists.mozilla.org/listinfo/dev-accessibility
Rajesh V R
2017-02-23 11:23:23 UTC
Permalink
Hi Marco,

Thanks for your reply.

1. May I know when e10s completely supports Windows? We are facing this issue only on Windows 7 machines. We tried with latest version of Firefox (51.0.1).

2. May I know why it is working with Windows 8 and Windows 10?

Thanks,
Rajesh
Post by Marco Zehe
Hello Rajesh,
1. Firefox 49 is outdated.
2. No official version supports accessibility with E10S on in Windows yet. If you need to use accessibility services of any kind, please only use it with E10S off. This is a known problem and won't be fixed in older versions of Firefox.
Marco
Von meinem iPad gesendet
Post by Rajesh V R
// header files
#include "ISimpleDOMNode.h"
#include "ISimpleDOMText.h"
#include "ISimpleDOMDocument.h"
// GUIDs
const GUID refguid = {0x0c539790, 0x12e4, 0x11cf, 0xb6, 0x61, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8};
const IID IID_ISimpleDOMNode= {0x1814ceeb,0x49e2,0x407f,0xaf,0x99,0xfa,0x75,0x5a,0x7d,0x26,0x07};
const IID IID_ISimpleDOMText= {0x4e747be5,0x2052,0x4265,0x8a,0xf0,0x8e,0xca,0xd7,0xaa,0xd1,0xc0};
const IID IID_ISimpleDOMDocument= {0x0D68D6D0,0xD93D,0x4d08,0xA3,0x0D,0xF0,0x0D,0xD1,0xF4,0x5B,0x24};
Void FindURLfromWindow(HWND hwnd)
{
try
{
if(hwnd)
{
IAccessible *pAccBrowser = NULL;
HRESULT hr = AccessibleObjectFromWindow(hwnd, OBJID_CLIENT, IID_IAccessible, (void**)&pAccBrowser);
if(SUCCEEDED(hr) && (pAccBrowser))
{
VARIANT vtStart;
VARIANT vtResult;
vtStart.vt = VT_I4;
vtStart.lVal = CHILDID_SELF;
/////////////////////////////
hr = pAccBrowser->accNavigate(NAVRELATION_EMBEDS,vtStart,&vtResult);
if(SUCCEEDED(hr))
{
IDispatch *pDisp = vtResult.pdispVal;
IAccessible *pAccDoc = NULL;
hr = pDisp->QueryInterface(IID_IAccessible,(void **)&pAccDoc);
if(SUCCEEDED(hr) && (pAccDoc))
{
hr = pAccDoc->QueryInterface(IID_IServiceProvider, (void **)&pServProv);
if(SUCCEEDED(hr) && (pServProv))
{
ISimpleDOMNode *pNode = NULL;
hr = pServProv->QueryService(refguid, IID_ISimpleDOMNode,(void **)&pNode); //failed in Windows 7
if(SUCCEEDED(hr) && (pNode))
{
ISimpleDOMDocument *pDoc = NULL;
hr = pNode->QueryInterface(IID_ISimpleDOMDocument, (void **)&pDoc);
if(SUCCEEDED(hr) && (pDoc))
{
BSTR bstrUrl = NULL;
hr = pDoc->get_URL(&bstrUrl);
if(SUCCEEDED(hr) && (bstrUrl))
{
//success
}
}
}
}
}
}
}
}
}
catch(...)
{
}
}
//
Kindly help me to solve this issue.
_______________________________________________
dev-accessibility mailing list
https://lists.mozilla.org/listinfo/dev-accessibility
Alexander Surkov
2017-02-23 12:27:02 UTC
Permalink
Cc'ing more folks.

Aaron, do you have ideas why else [1] QueryService(IID_ISimpleDOMNode) may
fail? AT vendor complained about same issue too. It seems like the issue is
not restricted to any particular machine.

Please feel free to move the discussion back to the bug.

Thanks!
Alex.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1310166#c29
Post by Rajesh V R
Hi Marco,
Thanks for your reply.
1. May I know when e10s completely supports Windows? We are facing this
issue only on Windows 7 machines. We tried with latest version of Firefox
(51.0.1).
2. May I know why it is working with Windows 8 and Windows 10?
Thanks,
Rajesh
Post by Marco Zehe
Hello Rajesh,
1. Firefox 49 is outdated.
2. No official version supports accessibility with E10S on in Windows
yet. If you need to use accessibility services of any kind, please only use
it with E10S off. This is a known problem and won't be fixed in older
versions of Firefox.
Post by Marco Zehe
Marco
Von meinem iPad gesendet
Post by Rajesh V R
I am trying to find the URL from Mozilla window using VC++ project.
For doing this, I used QueryService() API with parameter
IID_ISimpleDOMNode". But the API fails on Windows 7 machines (both 32 bit
Post by Marco Zehe
Post by Rajesh V R
// header files
#include "ISimpleDOMNode.h"
#include "ISimpleDOMText.h"
#include "ISimpleDOMDocument.h"
// GUIDs
const GUID refguid = {0x0c539790, 0x12e4, 0x11cf, 0xb6, 0x61, 0x00,
0xaa, 0x00, 0x4c, 0xd6, 0xd8};
Post by Marco Zehe
Post by Rajesh V R
const IID IID_ISimpleDOMNode= {0x1814ceeb,0x49e2,0x407f,
0xaf,0x99,0xfa,0x75,0x5a,0x7d,0x26,0x07};
Post by Marco Zehe
Post by Rajesh V R
const IID IID_ISimpleDOMText= {0x4e747be5,0x2052,0x4265,
0x8a,0xf0,0x8e,0xca,0xd7,0xaa,0xd1,0xc0};
Post by Marco Zehe
Post by Rajesh V R
const IID IID_ISimpleDOMDocument= {0x0D68D6D0,0xD93D,0x4d08,
0xA3,0x0D,0xF0,0x0D,0xD1,0xF4,0x5B,0x24};
Post by Marco Zehe
Post by Rajesh V R
Void FindURLfromWindow(HWND hwnd)
{
try
{
if(hwnd)
{
IAccessible *pAccBrowser = NULL;
HRESULT hr = AccessibleObjectFromWindow(hwnd,
OBJID_CLIENT, IID_IAccessible, (void**)&pAccBrowser);
Post by Marco Zehe
Post by Rajesh V R
if(SUCCEEDED(hr) && (pAccBrowser))
{
VARIANT vtStart;
VARIANT vtResult;
vtStart.vt = VT_I4;
vtStart.lVal = CHILDID_SELF;
/////////////////////////////
hr = pAccBrowser->accNavigate(
NAVRELATION_EMBEDS,vtStart,&vtResult);
Post by Marco Zehe
Post by Rajesh V R
if(SUCCEEDED(hr))
{
IDispatch *pDisp = vtResult.pdispVal;
IAccessible *pAccDoc = NULL;
hr = pDisp->QueryInterface(IID_IAccessible,(void
**)&pAccDoc);
Post by Marco Zehe
Post by Rajesh V R
if(SUCCEEDED(hr) && (pAccDoc))
{
hr = pAccDoc->QueryInterface(IID_IServiceProvider,
(void **)&pServProv);
Post by Marco Zehe
Post by Rajesh V R
if(SUCCEEDED(hr) && (pServProv))
{
ISimpleDOMNode *pNode = NULL;
hr = pServProv->QueryService(refguid,
IID_ISimpleDOMNode,(void **)&pNode); //failed in Windows 7
Post by Marco Zehe
Post by Rajesh V R
if(SUCCEEDED(hr) && (pNode))
{
ISimpleDOMDocument *pDoc = NULL;
hr = pNode->QueryInterface(IID_ISimpleDOMDocument,
(void **)&pDoc);
Post by Marco Zehe
Post by Rajesh V R
if(SUCCEEDED(hr) && (pDoc))
{
BSTR bstrUrl = NULL;
hr = pDoc->get_URL(&bstrUrl);
if(SUCCEEDED(hr) && (bstrUrl))
{
//success
}
}
}
}
}
}
}
}
}
catch(...)
{
}
}
//
Kindly help me to solve this issue.
_______________________________________________
dev-accessibility mailing list
https://lists.mozilla.org/listinfo/dev-accessibility
_______________________________________________
dev-accessibility mailing list
https://lists.mozilla.org/listinfo/dev-accessibility
Aaron Klotz
2017-02-23 18:19:27 UTC
Permalink
Moving discussion to bug...
Post by Alexander Surkov
Cc'ing more folks.
Aaron, do you have ideas why else [1] QueryService(IID_ISimpleDOMNode)
may fail? AT vendor complained about same issue too. It seems like the
issue is not restricted to any particular machine.
Please feel free to move the discussion back to the bug.
Thanks!
Alex.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1310166#c29
Hi Marco,
Thanks for your reply.
1. May I know when e10s completely supports Windows? We are facing
this issue only on Windows 7 machines. We tried with latest
version of Firefox (51.0.1).
2. May I know why it is working with Windows 8 and Windows 10?
Thanks,
Rajesh
Post by Marco Zehe
Hello Rajesh,
1. Firefox 49 is outdated.
2. No official version supports accessibility with E10S on in
Windows yet. If you need to use accessibility services of any
kind, please only use it with E10S off. This is a known problem
and won't be fixed in older versions of Firefox.
Post by Marco Zehe
Marco
Von meinem iPad gesendet
Am 22.02.2017 um 07:42 schrieb Rajesh V R
I am trying to find the URL from Mozilla window using VC++
project. For doing this, I used QueryService() API with parameter
IID_ISimpleDOMNode". But the API fails on Windows 7 machines (both
32 bit and 64 bit) with Mozilla Version- 49.0.1. Sample code is
Post by Marco Zehe
// header files
#include "ISimpleDOMNode.h"
#include "ISimpleDOMText.h"
#include "ISimpleDOMDocument.h"
// GUIDs
const GUID refguid = {0x0c539790, 0x12e4, 0x11cf, 0xb6, 0x61,
0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8};
Post by Marco Zehe
const IID IID_ISimpleDOMNode=
{0x1814ceeb,0x49e2,0x407f,0xaf,0x99,0xfa,0x75,0x5a,0x7d,0x26,0x07};
Post by Marco Zehe
const IID IID_ISimpleDOMText=
{0x4e747be5,0x2052,0x4265,0x8a,0xf0,0x8e,0xca,0xd7,0xaa,0xd1,0xc0};
Post by Marco Zehe
const IID IID_ISimpleDOMDocument=
{0x0D68D6D0,0xD93D,0x4d08,0xA3,0x0D,0xF0,0x0D,0xD1,0xF4,0x5B,0x24};
Post by Marco Zehe
Void FindURLfromWindow(HWND hwnd)
{
try
{
if(hwnd)
{
IAccessible *pAccBrowser = NULL;
HRESULT hr = AccessibleObjectFromWindow(hwnd,
OBJID_CLIENT, IID_IAccessible, (void**)&pAccBrowser);
Post by Marco Zehe
if(SUCCEEDED(hr) && (pAccBrowser))
{
VARIANT vtStart;
VARIANT vtResult;
vtStart.vt = VT_I4;
vtStart.lVal = CHILDID_SELF;
/////////////////////////////
hr =
pAccBrowser->accNavigate(NAVRELATION_EMBEDS,vtStart,&vtResult);
Post by Marco Zehe
if(SUCCEEDED(hr))
{
IDispatch *pDisp = vtResult.pdispVal;
IAccessible *pAccDoc = NULL;
hr =
pDisp->QueryInterface(IID_IAccessible,(void **)&pAccDoc);
Post by Marco Zehe
if(SUCCEEDED(hr) && (pAccDoc))
{
hr =
pAccDoc->QueryInterface(IID_IServiceProvider, (void **)&pServProv);
Post by Marco Zehe
if(SUCCEEDED(hr) && (pServProv))
{
ISimpleDOMNode *pNode = NULL;
hr =
pServProv->QueryService(refguid, IID_ISimpleDOMNode,(void
**)&pNode); //failed in Windows 7
Post by Marco Zehe
if(SUCCEEDED(hr) && (pNode))
{
ISimpleDOMDocument *pDoc = NULL;
hr =
pNode->QueryInterface(IID_ISimpleDOMDocument, (void **)&pDoc);
Post by Marco Zehe
if(SUCCEEDED(hr) && (pDoc))
{
BSTR bstrUrl = NULL;
hr = pDoc->get_URL(&bstrUrl);
if(SUCCEEDED(hr) && (bstrUrl))
{
//success
}
}
}
}
}
}
}
}
}
catch(...)
{
}
}
//
Kindly help me to solve this issue.
_______________________________________________
dev-accessibility mailing list
https://lists.mozilla.org/listinfo/dev-accessibility
<https://lists.mozilla.org/listinfo/dev-accessibility>
_______________________________________________
dev-accessibility mailing list
https://lists.mozilla.org/listinfo/dev-accessibility
<https://lists.mozilla.org/listinfo/dev-accessibility>
Loading...