Purpose
Register a callback function for events. The callback function is called whenever an event of the specified type occurs.
Syntax
#using Spo.SPDlib SPD_errorType SPDHandleEvent ( SPD_eventType type, SPD_eventCallback callback, Object passback )
Description
This function registers a callback to handle events.
type
is the type of event that will be supplied to the callback.
callback
is the callback function that is invoked when an event of the specified type is received by the client. If set to NULL with SPDMultiDelegate flag set to false, the callback that was previously registered is removed for the event.
passback
is any data that the client wants returned when the callback 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 previously |
SPD_invalidType | Bad type parameter |
SPD_commFailure | Communications problem |
SPD_errException | A .NET runtime exception occurs |
See Also
See also the following client functions:
SPDAckAlarm (see Section [xref text to replace])
SPDClearAlarm (see Section [xref text to replace])
SPDDeleteObject (see Section [xref text to replace])
SPDLogMessage (see Section [xref text to replace])
SPDReportValue (see Section [xref text to replace])
SPDRequestEvents (see Section [xref text to replace])
SPDSendAlarm (see Section [xref text to replace])
SPDSendUserAlarm (see Section [xref text to replace])