ASPUserCommand
ASPUserCommand Send a command to the server
#include <AppleTalk.h> AppleTalk Manager
OSErr ASPUserCommand( xParamBlock, async);
XPPParmBlkPtr xParamBlock; pointer to an AppleTalk parameter block
Boolean async; 0=await completion; 1=immediate return
returns Error Code; 0=no error
ASPUserCommand sends a command to the server on a session.
xParamBlock is a pointer to a parameter block structure. The relevant fields are
as follows:
Out-InName Type Size Offset Description
¨ cmdResult long 4 18 ASP command result
¨ csCode short 2 26 AlwaysASPUserCommand
¨ sessRefnum short 2 28 Session number
¨ aspTimeout char 1 30 Retry interval in seconds
¨ cbSize short 2 32 Command block size
¨ cbPtr Ptr 4 34 Command block pointer
´ rbSize short 2 38 Reply buffer and reply size
¨ rbPtr Ptr 4 40 Reply buffer pointer
¨ ccbStart record 150 50 Start of memory for CCB
async is a Boolean value. Use FALSE for normal ( synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O.
Returns: an operating system Error Code.
aspBufTooSmall (-1067) Reply is bigger than response buffer; the buffer will
be filled, data will be truncated
aspParamErr (-1070) Server returned bad (positive) error code
aspSessClosed (-1072) Session already in process of closing
aspSizeErr (-1073) Command block size is buffer than MaxCmdSize

Notes: SessRefnum is the session reference number returned in the
ASPOpenSession call.
ASPTimeOut is the interval in seconds between retries of the call. Notice
that there is no aspRetry field (retries are infinite). The command will be
retried at the prescribed interval until completion or the session is closed.
CBSize is the size in bytes of the command data that is to be written on the
session. The size of the command block must not exceed the value of
aspMaxCmdSize returned by the ASPGetParms call.
CBPtr points to the command data.
RBSize is passed and indicates the size of the reply buffer in bytes expected
by the command. RBSize is also returned and indicates the size of the reply
that was actually returned.
RBPtr points to the reply buffer.
CCBStart is the start of the memory to be used by the .XPP driver for the
command control block. The size of this block is equal to a maximum of 150
bytes.