ERdCancel
ERdCancel Cancel execution of a specific call to the ERead function
#include <ENET.h> AppleTalk Manager
OSErr ERdCancel( thePBptr, async);
EParamBlkPtr thePBptr; address of an EParamBlock structure
Boolean async; 0=await completion; 1=immediate return
returns Error Code; 0=no error
ERdCancel cancels execution of a specific call to the ERead function.
thePBptr is a pointer to an EParamBlock structure. The relevant fields are as
follows:
Out-InName Type Size Offset Description
¨ ioResult short 2 16 Result code
Æ csCode short 2 26 Always ENetRdCancel
Æ eProtType short 2 28 Ethernet protocol type
Æ ePointer long 4 30 pointer to data buffer
async is a Boolean value. Use FALSE for normal ( synchronous) operation
or TRUE to function asynchronously. See Async I/O.
Returns: an operating system Error Code. It will be one of:
noErr (0) No error
cbNotFound (-1102) ERead not active

Notes: You must have called the ERead function asynchronously to use the
ERdCancel function. You specify in the ePointer parameter a pointer to
the parameter block that you used when you called the ERead function. The
ioResult parameter returns the result of the function. If you call the
function asynchronously, the function sets this field to 1 as soon as it
begins execution, and it changes the field to the actual result code when it
completes execution. The csCode parameter is the routine selector,
automatically set by the high-level language interface. It is always
ENetRdCancel for this function.
When you call the ERdCancel function, the pending ERead function that
you cancel receives the reqAborted result code.