[Accessibility-ia2] QI/QS
Michael Curran
michaeldamiencurran at gmail.com
Fri Feb 13 15:51:01 PST 2009
>. If the SID is IID_IAccessibleApplication and the IID is
IID_IAcessibleApplication then return the
>IAcessibleApplication interface, otherwise return E_NOINTERFACE.
The IID can also be IUnknown, as IAccessibleApplication inherits from
IUnknown.
Mick
On 14/02/2009 10:32 AM, Pete Brunet wrote:
> Thanks Mick, IAccessible is defined to derive from IDispatch but
> although IAccessible2 currently derives from IAccessible, it should
> not have. This is a documented error. When that is eventually fixed
> IAccessible2 would only derive from IUnknown. So you should not be
> able to QI from IAccessible2 to IAccessible or IDispatch.
>
> All, Please review the following update. Also I have a question at
> the bottom.
>
> *QI & QS in the IAccessible2 object*
>
> QueryInterface
>
> * If the IID is IID_IUnknown or the IID of any of the IA2
> interfaces except IAApplication then return the requested
> interface for the IA2 object.
> * If the IID is IID_IServiceProvider, return the IServiceProvider
> interface for the service provider object.
> * If the IID is IID_IEnumVariant, return the IEnumVariant
> interface for the object imlementing it.
> * If the IID is the one for IAccessible, IDispatch,
> IAccessibleApplication, or any other IID return E_NOINTERFACE.
>
>
> QueryService
>
> * If the SID is IID_IAccessible and the IID is IID_IUnknown,
> IID_IDispatch, or IID_IAccessible, then return the requested
> interface for the IAccessible object, otherwise return
> E_NOINTERFACE.
> * If the SID is IID_IAccessible2 and the IID is IID_IUnknown or
> the IID for any of the IA2 interfaces except IAApplication then
> return the requested interface for the IA2 object, otherwise
> return E_NOINTERFACE.
> * If the SID is IID_IAccessibleApplication and the IID is
> IID_IAcessibleApplication then return the IAcessibleApplication
> interface, otherwise return E_NOINTERFACE.
>
>
> *QI & QS in the IAccessibleApplication object*
>
> QueryInterface
>
> * If the IID is IID_IUnknown return the IUnknown interface for the
> same object.
> * If the IID is IID_IServiceProvider, return the IServiceProvider
> interface for the service provider object.
> * Otherwise return E_NOINTERFACE.
>
>
> QueryService
>
> * If the SID is IID_IAccessible and the IID is IID_IUnknown,
> IID_IDispatch, or IID_IAccessible, then return the IAccessible
> for the IAccessible object, otherwise return E_NOINTERFACE.
> * If the SID is IID_IAccessible2 and the IID is IID_IUnknown or
> the IID for any of the IA2 interfaces except IAApplication then
> return the requested interface for the IA2 object, otherwise
> return E_NOINTERFACE.
> * If the SID is IID_IAccessibleApplication and the IID is
> IID_IAcessibleApplication then return the IAcessibleApplication
> interface for the same object, else return E_NOINTERFACE.
>
> *
> QI & QS in the IAccessible object*
>
> QueryInterface
>
> * If the IID is IAccessible2, return E_NOINTERFACE.
>
>
> QueryService
>
> * If the SID is IID_IAccessible2 and the IID is IID_IUnknown or
> any of the IA2 interfaces then return the requested interface,
> else return E_NOINTEFACE.
>
>
> Should this final QS only respond to IID_IAccessible2 or should it
> respond to any of the IA2 IIDs?
>
> *Pete Brunet*
>
> IBM Accessibility Architecture and Development
> 11501 Burnet Road, MS 9022E004, Austin, TX 78758
> Voice: (512) 286-5485, Cell: (512) 689-4155
> Ionosphere: WS4G
>
>
>
> From: Michael Curran <michaeldamiencurran at gmail.com>
> To: accessibility-ia2 at lists.freestandards.org
> Date: 01/30/2009 07:05 PM
> Subject: Re: [Accessibility-ia2] QI/QS
> Sent by: accessibility-ia2-bounces at lists.linux-foundation.org
>
>
> ------------------------------------------------------------------------
>
>
>
> Hi Pete,
>
> I agree with most of it, except in regards to IUnknown and IDispatch.
>
> QueryInterface with an IID of IUnknown or queryService with a valid
> service ID and an IID of IUnknown should always work.
>
> This is because the IAccessible and IAccessible2 interfaces inherit from
> IUnknown.
>
> For IDispatch, this depends on whether the application has implemented
> IDispatch in their implementation or not.
>
> If they provide the IDispatch interface on their object, then an IID of
> IDispatch should be allowed, if they do not, then I guess it shouldn't be.
>
> An example of an app with no IDispatch support is Gecko.
>
> Mick
>
>
>
> On 31/01/2009 8:30 AM, Pete Brunet wrote:
> > Please review the following regarding implementing QI/QS in an app.
> >
> > *QI & QS in the IAccessible2 object*
> >
> > QueryInterface
> >
> > * If the IID is IID_IUnknown, IID_IDispatch, or the one for any of
> > the IA2 interfaces except IAApplication then return the IA2
> > object that implements that interface.
> > * If the IID is IID_IServiceProvider, return the service provider
> > object
> > * If the IID is IID_IEnumVariant, return the IEnumVariant object
> > * If the IID is the one for IAccessible, IAApplication, or any
> > other IID return E_NOINTERFACE.
> >
> >
> > QueryService
> >
> > * If the SID is IID_IAccessible and the IID is IID_IUnknown,
> > IID_IDispatch, or IID_IAccessible, then return the IAccessible
> > object, otherwise return E_NOINTERFACE. Or should E_NOINTERFACE
> > also be returned for IID_IUnknown and IID_IDispatch?
> > * If the SID is IID_IAccessible2 and the IID is IID_IUnknown,
> > IID_IDispatch, or the IID for any of the IA2 interfaces except
> > IAApplication then return the IA2 object that implements that
> > interface, otherwise return E_NOINTERFACE.
> > * If the SID is IID_IAccessibleApplication and the IID is
> > IID_IAcessibleApplication then return the object for
> > IAApplication, else return E_NOINTERFACE.
> >
> >
> > *QI & QS in the IAccessible object*
> >
> > QueryInterface
> >
> > * Don't handle IAccessible2
> >
> >
> > QueryService
> >
> > * If the SID is IID_IAccessible2 and the IID is IID_IUnknown,
> > IID_IDispatch, or any of the IA2 interfaces then return the IA2
> > object that implements that interface, else return E_NOINTEFACE.
> > Or should E_NOINTERFACE also be returned for IID_IUnknown and
> > IID_IDispatch?
> >
> >
> > Also, this looks like a good reference:
> > http://blogs.msdn.com/oldnewthing/archive/2004/03/26/96777.aspx
> >
> > *Pete Brunet*
> >
> > IBM Accessibility Architecture and Development
> > 11501 Burnet Road, MS 9022E004, Austin, TX 78758
> > Voice: (512) 286-5485, Cell: (512) 689-4155
> > Ionosphere: WS4G
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Accessibility-ia2 mailing list
> > Accessibility-ia2 at lists.linux-foundation.org
> > https://lists.linux-foundation.org/mailman/listinfo/accessibility-ia2
> >
> _______________________________________________
> Accessibility-ia2 mailing list
> Accessibility-ia2 at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/accessibility-ia2
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Accessibility-ia2 mailing list
> Accessibility-ia2 at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/accessibility-ia2
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux-foundation.org/pipermail/accessibility-ia2/attachments/20090214/6aac3e7c/attachment-0001.htm
More information about the Accessibility-ia2
mailing list