NWDSERegisterForEvent
Registers a function to be used as a callback when a specific eDirectory event occurs.
#include <nwdsdsa.h>
#include <nwdsevnt.h>
N_EXTERN_LIBRARY (NWDSCCODE) NWDSERegisterForEvent (
nint priority,
nuint32 type,
nint (*handler) (
nuint32 type,
nuint size,
nptr *data));
|
0x0000 |
Successful |
|
Negative Value |
Negative values indicate errors. For
error values, see |
The handler parameter is a pointer to a function that is to be called when the specified eDirectory event occurs. The function is defined as follows:
The value returned by the callback must be 0 for success and any other value for failure. If the callback returns a nonzero value during a EP_INLINE priority event, the event will be aborted. The callback’s return values for the EP_JOURNAL and EP_WORK priority events are ignored.
WARNING:Your application must not modify the data at the location pointed to by data. Multiple callbacks can be registered for each event, and all of the callbacks receive that same data. When a callback returns, the information pointed to by data is passed into the next callback, if one is registered. Changing the information pointed to by data can produce unpredictable behavior in other callbacks. If you are going to modify the information pointed to by data, make a local copy of the information.
The callbacks are run on threads that do not have CLIB context. If you are using functions that need CLIB context, you must establish the context by calling SetThreadGroupID (NLM Threads Management).