Accessing an ISimpleDOMNode

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Accessing an ISimpleDOMNode

Lasse Wallentin
Hi!

Acording to the document: "Gecko Info for Windows Accessibility Vendors"
it should be possible to get the ISimpleDOMNode interface for an object
by using QueryService on an IAccessible pointer.

I cannot seem to get this to work.

The exaple below will only produce the output: (testet on firefox 1.0.7)
succes accessing an iaccessible!
succes accessing an IServiceProvider!

This tells us that I do not get hold of the ISimpleDOMNode interface!

The code should be indentical to the lines presented in the before
mentioned document!

Can anyone tell me what I'm doing wrong or even better post an example
of some working code?

if (windowType == "MozillaWindowClass") {
    IAccessible *pAccessible;
    HRESULT hr = AccessibleObjectFromWindow(hwnd, OBJID_CLIENT,
IID_IAccessible,(void**)&pAccessible);
    if (SUCCEEDED(hr) && pAccessible != NULL) {
        std::cout << "succes accessing an iaccessible!\n";

        IServiceProvider *pServProv = NULL;
        pAccessible->QueryInterface(IID_IServiceProvider,
(void**)&pServProv);
        if (pServProv) {
            std::cout << "succes accessing an IServiceProvider!\n";

         ISimpleDOMDocument *pSimpleDOMNode;
            const GUID refguid = {0x0c539790, 0x12e4, 0x11cf, 0xb6,
0x61, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8};
            HRESULT hr = pServProv->QueryService(refguid,
IID_ISimpleDOMNode, (void**)&pSimpleDOMNode);
            if (SUCCEEDED(hr) && pSimpleDOMNode != NULL) {
         std::cout << "succes accessing an ISimpleDOMNode!\n";
            }
        }  
    }
}

Thanks in advance.

/W

_______________________________________________
mozilla-accessibility mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-accessibility
Reply | Threaded
Open this post in threaded view
|

SV: Accessing an ISimpleDOMNode

Lasse Wallentin
>
> The exaple below will only produce the output: (testet on
> firefox 1.0.7) succes accessing an iaccessible!
> succes accessing an IServiceProvider!

I updated to firefox 1.5 and everything works as described!

/W

_______________________________________________
mozilla-accessibility mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-accessibility