ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

template<class T, const IID * piid, class CDV = CComDynamicUnkArray>
STDMETHODIMP MyIConnectionPointImpl< T, piid, CDV >::Advise ( IUnknown pUnkSink,
DWORD pdwCookie 
) [inline]

Definition at line 53 of file newatlinterfaces.h.

    {
        IConnectionPointImpl<T, piid, CDV>  *pThisCPImpl;
        T                                   *pThis;
        IUnknown                            *adviseSink;
        DWORD                               newCookie;
        HRESULT                             hResult;

        pThis = static_cast<T *>(this);
        pThisCPImpl = static_cast<IConnectionPointImpl<T, piid, CDV> *>(this);
        if (pdwCookie != NULL)
            *pdwCookie = 0;
        if (pUnkSink == NULL || pdwCookie == NULL)
            return E_POINTER;
        hResult = pUnkSink->QueryInterface(IID_IDispatch, (void **)&adviseSink);
        if (FAILED(hResult))
        {
            if (hResult == E_NOINTERFACE)
                return CONNECT_E_CANNOTCONNECT;
            return hResult;
        }
        pThis->Lock();
        newCookie = pThisCPImpl->m_vec.Add(adviseSink);
        pThis->Unlock();
        *pdwCookie = newCookie;
        if (newCookie != 0)
            hResult = S_OK;
        else
        {
            adviseSink->Release();
            hResult = CONNECT_E_ADVISELIMIT;
        }
        return hResult;
    }

Generated on Sun May 27 2012 06:31:01 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.