EventSource::Add Method

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at EventSource::Add Method.

Appends the event handler represented by the specified delegate interface to the set of event handlers for the current EventSource object.

HRESULT Add(  
   _In_ TDelegateInterface* delegateInterface,  
   _Out_ EventRegistrationToken* token  
);  

Parameters

delegateInterface
The interface to a delegate object, which represents an event handler.

token
When this operation completes, a handle that represents the event. Use this token as the parameter to the Remove() method to discard the event handler.

S_OK if successful; otherwise, an HRESULT that indicates the error.

Header: event.h

Namespace: Microsoft::WRL

EventSource Class

Show: