[Accessibility-ia2] ideas for standardising QueryService in IAccessible2

Michael Curran michaeldamiencurran at gmail.com
Tue Jan 13 05:22:35 PST 2009

Hi all,

According to this link:

The way IAccessible2 allows QueryService may be a bit inappropriate.

The above link states that if you want to go from IAccessible to another 
native object model, you should provide the service ID for that object 
model, and a riid for the particular interface you want.

It talks about generating a GUID for any new service, so with that in 
mind, I don't think that IID_IACCESSIBLE is really supposed to be used.

I would like to put forward the proposal that for future IAccessible2 
versions that QueryService be used in the following way:

IAccessible to IAccessible2:

In that example, the second parameter could be replaced with the IID of 
any of the other IAccessible2 interfaces (such as IAccessibleText, 
IAccessibleValue etc).

However, for IAccessibleApplication (as there should probably only be 
one object instance per application), you would do:

To get back to IAccessible you could do:

So in short, the first parameter (the service ID) can be either 
IID_IAccessible2, IID_IAccessibleApplication or IID_IAccessible.
The second parameter can be the ID of any interface  supported by which 
ever of those three you chose.

Finally, it must be clear in the standard that if the object does not 
support any given service (this includes ones it doesn't know about) it 
must return E_INVALIDARG.

It is quite important that we have a very clearly defined way of using 
QueryService as ATs and accessibility bridges/proxies and the like make 
heavy use of QueryService and these implementations may use QueryService 
to test if a service is supported.

What are peoples' thoughts on this?


More information about the Accessibility-ia2 mailing list