Important: The information in this document is obsolete and should not be used for new development.
PKillNBP
ThePKillNBPfunction cancels NBP function calls to thePLookupName,PRegisterName, orPConfirmNamefunction.
FUNCTION PKillNBP (thePBptr: MPPPBPtr; async: Boolean): OSErr;
thePBptr- A pointer to an MPP parameter block.
async- A Boolean that specifies whether the function should be executed asynchronously or synchronously. Specify
TRUEfor asynchronous execution.
--> ioCompletion ProcPtr A pointer to a completion routine. <-- ioResult OSErr The function result. --> ioRefNum Integer The .MPP driver reference number. --> csCode Integer Always killNBP.--> nKillQEl Ptr A pointer to a queue element.
Field Description
ioCompletion- A pointer to a completion routine that you can provide. When you execute a function asynchronously, the .MPP driver calls your completion routine when it completes execution of the function if you specify a pointer to the routine as the value of this field. Specify
NILfor this field if you do not wish to provide a completion routine. If you execute a function synchronously, the .MPP driver ignores theioCompletionfield. For information about completion routines, see the chapter "Introduction to AppleTalk" in this book.ioResult- The result of the function. When you execute the function asynchro-
nously, the function sets this field to 1 and returns a function result ofnoErras soon as the function begins execution. When the function completes execution, it sets theioResultfield to the actual result code.ioRefNum- The .MPP driver reference number. The MPW interface fills in
this field.csCode- The command code of the .MPP command to be executed. The MPW interface fills in this field.
nKillQEl- A pointer to the MPP parameter block for the NBP request you want to cancel.
DESCRIPTION
When you call thePLookupName,PRegisterName, orPConfirmNamefunction asyn-
chronously, the Device Manager puts your request in the .MPP driver's queue with
other requests. If you want to cancel a pending NBP request, you pass a pointer to the parameter block for that request to thePKillNBPfunction.If the function's parameter block is in the .MPP driver's queue waiting for the function
to be executed, thePKillNBPfunction deletes the entry from the queue and returns
a function result ofnoErr. The function whose parameter block is deleted completes execution and returns a function result ofreqAborted, indicating that the function
was canceled.If the function has already been executed, that is, it is no longer in the queue,
PKillNBPreturns a function result ofcbNotFound, indicating that the parameter block for the function to be canceled was not in the .MPP driver's queue.The function also calls the completion routine for the canceled request with the result code
reqAborted(-1105) in the D0 register.ASSEMBLY-LANGUAGE INFORMATION
To execute thePKillNBPfunction from assembly language, call the_Controltrap macro with a value ofkillNBPin thecsCodefield of the parameter block. To execute the_Controltrap asynchronously, include the value,ASYNCin the operand field.
To execute this function from assembly language, you must also specify the driver reference number.RESULT CODES
noErr 0 No error cbNotFound -1102 NBP queue element not found