PPCEndSync
PPCEnd End a PPC session
#include <PPCToolbox.h> PPC Toolbox
OSErr PPCEnd(pb, async);
PPCEndPBPtr pb; Pointer to PPC parameter block
Boolean async; if TRUE, use asynchronous communications
returns Error Code; 0=no error
On entry A0: pointer to a parameter block
D0: selector (8)
On exit D0: result code
Parameter block
Æ 12 ioCompletion long address of a completion routine
¨ 16 ioResult short result code
Æ 40 sessRefNum long session reference number of session to end
Use the PPCEnd function to end a session. This function completes all
outstanding asynchronous calls associated with the session reference number.
If your application calls this function asynchronously, you must specify in
the ioCompletion field either the address of a completion routine or NIL. If
ioCompletion is NIL, you should poll the ioResult field of the
PPC parameter block (from your application's main event loop) to determine
whether the PPC Toolbox has completed the requested operation. A value in
the ioResult field other than 1 indicates that the call is complete. Note that it is
unsafe to poll the ioResult field at interrupt time since the PPC Toolbox may
be in the process of completing a call.
You provide a session identifier in the sessRefNum field to identify the session
that you are terminating. The PPCStart, StartSecureSession, or
PPCInform function returns the session reference number.
Returns: an operating system Error Code.
noErr (0) No error
notInitErr (-900) PPC Toolbox has not been initialized yet
noGlobalsErr (-904) System unable to allocate memory, critical error
noSessionErr (-908) Invalid session reference number