PPCCloseSync
PPCClose Close a PPC port
#include <PPCToolbox.h> PPC Toolbox
OSErr PPCClose(pb, async);
PPCClosePBPtr 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 (9)
On exit D0: result code
Parameter block
Æ 12 ioCompletion long address of a completion routine
¨ 16 ioResult short result code
Æ 38 portRefNum short port reference number of port to close
You use the PPCClose function to close the port specified by the
port 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.
The portRefNum field specifies the PPC port identifier of the port to close.
The port reference number must be a valid port reference number returned
from a previous call to the PPCOpen function.
Returns: an operating system Error Code.
noErr (0) No error
notInitErr (-900) PPC Toolbox has not been initialized yet
noPortErr (-903) Bad port reference number
noGlobalsErr (-904) System unable to allocate memory, critical error