IDataSource::addDataSourceListener

Adds a listener to the notification list.

HRESULT addDataSourceListener(
DataSourceListener*pDSL);

Parameters

pDSL

[in]
Pointer to the interface of the listener. In case of any event, methods are called to that interface.

Return Codes

S_OK
The method succeeded.

E_FAIL
A provider-specific error occurred.

Comments

Checking for duplicate items and returning an error is optional. If the data source knows it will never issue notifications (for example, the data members are always available), it need not implement this method (it can just return S_OK). However, if it does issue notifications, it must multicast them. The HRESULTs returned from the multicast are ignored, and do not end the multicast.