Dispatches message and signal events to their handler routines.
int32 DispatchMSEvents(MSEventHandle mseHandle, void *userContext,int32 reserved)
Waits for events and dispatches processing to the event's handlers. Loops internally, waiting for messages and signals, dispatching the handlers when they are received, then looping back to wait again after the handlers return. As long as the handlers keep returning zero status, this function loops internally. As soon as a handler returns a non-zero value, this function returns that value to the caller.
By convention, a negative return value is an error. This may be an error returned by a handler function, or an error detected in waiting for and decoding an event. The latter should be very rare; the process of waiting for a message or signal, looking up the message, and so on, is relatively foolproof. If DeleteItem()
is called on the message or port item, the function is likely to fail.
SetupMSEvents()
.Returns negative on error, or any non-zero status returned by your event handler routines.
Library call implemented in lib3do.lib.
lib3do.lib, msgutils.h