SPDMonitorEventState

Purpose

Register a callback function that is invoked when the availability of a type of event changes state. Calling this function also causes the callback to be invoked immediately to report the event type's current state of availability.

Syntax

#using Spo.SPDlib
SPD_errorType SPDMonitorEventState
(
   SPD_eventType eventType,
   SPD_eventStateCallback callback,
   object passback
);

Description

This function registers a callback that is invoked when the availability of an event changes state. It also has the effect of immediately generating an invocation of the callback to determine the current state of availability of the event.

eventType

is the type of event whose availability is to be monitored.

callback

is the name of the function that is invoked when an event state change is detected (for example, when the source of the event type goes online or offline). Specify NULL to turn off event state reporting for the event type for this client.

passback

is a value passed to the callback function when it is invoked.

Return Value

The return value indicates whether an error occurred, as follows.

Return

Indication

SPD_normal

No error

SPD_notInitialized

SPDInitClient not called

SPD_badType

Bad eventType parameter

SPD_commFailure

Communications problem

SPD_errException

A .NET runtime exception occurs