int32 ReturnPreviousControlPad (int32 whichPad)
DoControlPad()
was called and a new state for
the control pad existed.
Because of system restrictions on item ownership and using items,
you should call this function from the task or thread which
called
InitControlPad()
.
InitControlPad()
and InitEventUtility()
create
message ports and message items which only the task which has created them
can use. Hence, DoControlPad()
can only be called by that
same task. If other tasks or threads attempt this errors result because
those tasks or threads do not own the appropriate message ports and
messages.
To make this function multi-thread capable, you would need to spawn a thread that communicates directly with the event broker, and with all the other tasks that will consume event information.
InitControlPad
, KillControlPad