User Manual

{ and enqueue my server event record into }
{ the usedQ. }
Enqueue(QElemPtr(theSERecQElemPtr), @usedQ);
{ Wake up our process so it can handle the server }
{ event record ASAP. }
IF WakeUpProcess(ourPSN) <> noErr THEN
; { Do nothing with errors-- }
{ you'd better not be getting them! }
END;
END;
{ InitSEQEntry initializes the fields of gExtendedSEQEntry }
{ to zero, allocates kNumberServerEvents of SERecQElem and }
{ enqueues them into the free queue of gExtendedSEQEntry, }
{ and gets the applications process serial number and puts }
{ it in gExtendedSEQEntry so the server event handler can }
{ wake up the process. InitSEQEntry returns TRUE if the }
{ array of SERecQElem was allocated. }
FUNCTION InitSEQEntry: Boolean;
VAR
theQElemsPtr: Ptr;
index: Integer;
BEGIN
WITH gExtendedSEQEntry DO
BEGIN
{ Point to server event handler. }
theSEQEntry.SEQentry.CallAddr :=
@TheSrvrEventHandler;
{ Initially clear all SEeventFlags, }
theSEQEntry.SEeventFlag := 0;