Important: The information in this document is obsolete and should not be used for new development.
PKillNBP
ThePKillNBP
function cancels NBP function calls to thePLookupName
,PRegisterName
, orPConfirmName
function.
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
TRUE
for 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
NIL
for this field if you do not wish to provide a completion routine. If you execute a function synchronously, the .MPP driver ignores theioCompletion
field. 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 ofnoErr
as soon as the function begins execution. When the function completes execution, it sets theioResult
field 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
, orPConfirmName
function 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 thePKillNBP
function.If the function's parameter block is in the .MPP driver's queue waiting for the function
to be executed, thePKillNBP
function 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,
PKillNBP
returns 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 thePKillNBP
function from assembly language, call the_Control
trap macro with a value ofkillNBP
in thecsCode
field of the parameter block. To execute the_Control
trap asynchronously, include the value,ASYNC
in 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