beautypg.com

Apple AppleShare 3.0 File Server Controls User Manual

Page 32

background image

qLink: QElemPtr;

qType: Integer;

theSERec: ServerEventRecord;

END;

{ Extend the tSEQEntry with a few items we need access }

{ to within the server event handler. }

ExtendedSEQEntryPtr = ^ExtendedSEQEntry;

ExtendedSEQEntry = RECORD

theSEQEntry: tSEQEntry; { A server event queue entry. }

freeQ, usedQ: QHdr; { Queue headers for server }

{ event record queues. }

seRecArrayPtr: Ptr; { Pointer to allocated array }

{ of SERecQElem. }

ourPSN: ProcessSerialNumber; { The application's PSN. }

END;

VAR

{ The global extended tSEQEntry record. }

gExtendedSEQEntry: ExtendedSEQEntry;

FUNCTION InstallServerEventHandler: OSErr;

FUNCTION RemoveServerEventHandler: OSErr;

PROCEDURE ProcessServerEvents;

{==========================================================}

IMPLEMENTATION

{ This function calls SCInstallServerEventProc to install }

{ a server event handler. }

FUNCTION mySCInstallServerEventProc

(theSEHandler: ProcPtr): OSErr;

VAR

scPB: SCParamBlockRec;