AddEvent

Add a new event to this source.
Events are identified by their Ids- Duplicate IDs are not allowed. Also events may only have one parent. If the event is already child of onother source, the function will fail.

 

HRESULT AddEvent([in]
IEvtCfgEvent* pEvent);

Parameters

pEvent

[in] pointer to the new event object to be added.

Return Values

S_OK

The new event was auccessfully added. The OnNewEvent event is fired.

E_FAIL

pEvente could not be added to the configuration. This can happen either if the source does already contain an event with the same Id or the evet is already child of another source

E_POINTER

pEvent was no valid pointer

E_ACCESSDENIED

The object is locked due to an asynchronous operation