ASPUserWrite
XPPParmBlkPtr xParamBlock; pointer to an AppleTalk parameter block Boolean async; 0=await completion; 1=immediate return ASPUserWrite transfers data on a session. It is one of the two main calls that can be used to transfer data on an ASP session. It returns data in two
different places. Four bytes of data are returned in the cmdResult field and a
variable size reply buffer is also returned.
xParamBlock is a pointer to a parameter block structure. The relevant fields are
as follows:
¨ cmdResult long 4 18 ASP command result
¨ sessRefnum short 2 28 Session reference 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 size and reply size
¨ rbPtr Ptr 4 40 Reply buffer pointer ¨ wdSize short 2 44 Write data size
¨ wdPtr Ptr 4 46 Write data pointer ¨ ccbStart record 296 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.
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: CmdResult is four bytes of data returned by the server.
SessRefnum is the session reference number returned in the
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. Note that this buffer is not the data to be written by the command but only the data of the
command itself.
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.
WDSize is passed and indicates the size of the write data in bytes to be sent
by the command. WDSize is also returned and indicates the size of the write
data that was actually written. WDPointer points to the write data 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 296
bytes.