23.1 Event Notification

The NetWare event system provides a mechanism for monitoring server activities. The event system generates events for local activities such as volumes mounting or dismounting, connections logging in or logging out, eDirectory objects being added, deleted, or modified, and an NLMâ„¢ being loaded or unloaded. See Event Types for a list of the events and the data types they use.

A monitoring application can decide which events it wants to monitor and then register for these events. For most events, you can decide whether to be notified before the event occurs (which uses a Warn Routine), after the event occurs (which uses a Report Routine), or both before and after. However, the type of routine must correlate with the event type. For example, if your application registers a Report Routine for the server down event, your application's routine is never called because your application is unloaded in the server down process. For a server down event, you should register for a Warn Routine, which is called before the event.

Thus, when designing your notification routine, you need to make decisions about the following:

An application remains registered for an event until the application requests that its event handler be removed (unregistered).

You use the following functions to interact the NetWare event system.

Function

Description

RegisterForEventNotification

Registers a callback routine, which is called when the specified event occurs.

UnRegisterEventNotification

Removes a previously registered callback routine.

CheckForRegisteredEvent

Determines whether the calling module has registered for a specific event.

EventCheck

EventReport

CanEventBlock

Determines whether an event type can currently block during a Report Routine.