Important: The information in this document is obsolete and should not be used for new development.
PPCReject
Use thePPCRejectfunction to reject a session request after aPPCInformfunction completes.
FUNCTION PPCReject (pb: PPCRejectPBPtr; async: Boolean): OSErr;
pb- A pointer to a
PPCRejectparameter block.async- A value that specifies whether the function is to be executed asynchronously (
TRUE) or synchronously (FALSE).
--> ioCompletion PPCCompProcPtr Address of a completion routine <-- ioResult OSErr Result code --> sessRefNum PPCSessRefNum Session reference number of session to reject --> rejectInfo LongInt Value to return if session is rejected DESCRIPTION
If your application calls thePPCRejectfunction asynchronously, you must specify in theioCompletionfield either the address of a completion routine orNIL. If you setioCompletiontoNIL, you should poll theioResultfield 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 theioResultfield other than 1 indicates that the call is complete. Note that it is unsafe to poll theioResultfield at interrupt time since the PPC Toolbox may be in the process of completing a call. See "PPC Toolbox Calling Conventions" beginning on page 11-14 for detailed information.The
sessRefNumfield specifies a session to be rejected. This must be a valid session reference number returned from a previousPPCInformfunction. TherejectInfofield is an optional field. The application receiving a session request may specify any data in this field. The initiating application receives this information in thePPCStartparameter block.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for thePPCRejectfunction are
Trap macro Selector _PPC $0005 The registers on entry and exit for this routine are
Registers on entry A0 Pointer to a parameter block D0 Selector code
Registers on exit D0 Result code RESULT CODES
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 badReqErr -909 Bad parameter or invalid state for this operation SEE ALSO
For an example of the use of thePPCRejectfunction, see page 11-39.