CComCompositeControl::AdviseSinkMap

HRESULT AdviseSinkMap( bool bAdvise );

Return Value

S_OK

All controls in the map were connected or disconnected from their event source successfully.

E_FAIL

Not all controls in the control map could be connected or disconnected from their event source successfully.

E_POINTER

This error usually indicates a problem with the control map entries or the IDispEventImpl entries in the MI list.

CONNECT_E_ADVISELIMIT

The connection point has already reached its limit of connections and cannot accept any more.

CONNECT_E_CANNOTCONNECT

The sink does not support the interface required by this connection point.

CONNECT_E_NOCONNECTION

The cookie value does not represent a valid connection. This error usually indicates a problem with the control map entries or the IDispEventImpl entries in the MI list.

Parameters

bAdvise

[in] TRUE if all controls are to be unadvised; otherwise FALSE.

Remarks

Call this function to advise or unadvise all controls hosted by the composite control.

The base implementation of this function searches through the entries in the event sink map. It then advises or unadvises the connection points to the COM objects described by the event sink map's sink entries. This member function also relies on the fact that the derived class inherits from one instance of IDispEventImpl for every control in the sink map that is to be advised or unadvised.

CComCompositeControl OverviewClass Members

See Also

IDispEventImpl, BEGIN_SINK_MAP