Поделиться через


IDispEventSimpleImpl::DispEventAdvise

Call this method to establish a connection with the event source represented by pUnk.

HRESULT DispEventAdvise(
   IUnknown* pUnk 
      const IID* piid 
);

Параметры

  • pUnk
    [in] A pointer to the IUnknown interface of the event source object.

  • piid
    A pointer to the IID of the event source object.

Возвращаемое значение

S_OK or any failure HRESULT value.

Заметки

Subsequently, events fired from pUnk will be routed to handlers in your class by way of the event sink map.

ПримечаниеПримечание.

If your class derives from multiple IDispEventSimpleImpl classes, you will need to disambiguate calls to this method by scoping the call with the particular base class you are interested in.

DispEventAdvise establishes a connection with the event source specified in pdiid.

Требования

Header: atlcom.h

См. также

Основные понятия

IDispEventSimpleImpl Class

IDispEventSimpleImpl Members

Supporting IDispEventImpl