tests/cefclient/browser/osr_accessibility_node_win.cc
// Handles ref counting and querying for other supported interfaces.
// We only support, IUnknown, IDispatch and IAccessible.
Handles ref counting and querying for other supported interfaces.
Handles ref counting and querying for other supported interfaces .
STDMETHODIMP CefIAccessible::QueryInterface(REFIID riid, void** ppvObject) {
  if (riid == IID_IAccessible)
    *ppvObject = static_cast<IAccessible*>(this);
  else if (riid == IID_IDispatch)
    *ppvObject = static_cast<IDispatch*>(this);
  else if (riid == IID_IUnknown)
    *ppvObject = static_cast<IUnknown*>(this);
  else
    *ppvObject = nullptr;
  if (*ppvObject)
    reinterpret_cast<IUnknown*>(*ppvObject)->AddRef();
  return (*ppvObject) ? S_OK : E_NOINTERFACE;
}
STDMETHODIMP CefIAccessible :: QueryInterface ( REFIID riid , void * * ppvObject ) { if ( riid == IID_IAccessible ) * ppvObject = static_cast < IAccessible * > ( this ) ; else if ( riid == IID_IDispatch ) * ppvObject = static_cast < IDispatch * > ( this ) ; else if ( riid == IID_IUnknown ) * ppvObject = static_cast < IUnknown * > ( this ) ; else * ppvObject = nullptr ; if ( * ppvObject ) reinterpret_cast < IUnknown * > ( * ppvObject ) -> AddRef ( ) ; return ( * ppvObject ) ? S_OK : E_NOINTERFACE ; }
Handles ref counting and querying for other supported interfaces.
Handles ref counting and querying for other supported interfaces .