Access Additional Interfaces (Windows CE 5.0)

Send Feedback

If your filter implements any interfaces that are not implemented in the base classes, you must override the NonDelegatingQueryInterface function and return pointers to the implemented interfaces.

In the public section of your filter class definition, declare NonDelegatingQueryInterface.

    STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);

In the implementation section of your class, implement the NonDelegatingQueryInterface function. For example:

    // Reveal persistent stream and property pages.
    STDMETHODIMP CMyFilter::NonDelegatingQueryInterface(REFIID riid, void **ppv)
    {
        if (riid == IID_IPersistStream) {
          AddRef( );   // Add a reference count. Be sure to release when done.
         *ppv = (void *) (IPersistStream *) this; 
          return NOERROR;
       }
       else if (riid == IID_ISpecifyPropertyPages) {
             return GetInterface((ISpecifyPropertyPages *) this, ppv);
       }  
       else {
          return CTransInPlaceFilter::NonDelegatingQueryInterface(riid, ppv);
       }
    }

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.