Important: The information in this document is obsolete and should not be used for new development.
MPP Parameter Block
The DDPPOpenSkt
,PCloseSkt
, andPWriteDDP
functions use the following variant record of the MPP parameter block, defined by theMPPParamBlock
data type, to pass information to and receive it from the .MPP driver.This section defines the fields that are common to all of the DDP functions that use the MPP parameter block. (The
BuildDDPwds
procedure does not use the MPP parameter block.) The fields that are used for specific functions only are defined in the descriptions of the functions to which they apply. This section does not define reserved fields, which are used either internally by the .MPP driver or not at all.
TYPE MPPParamBlock = PACKED RECORD qLink: QElemPtr; {reserved} qType: Integer; {reserved} ioTrap: Integer; {reserved} ioCmdAddr: Ptr; {reserved} ioCompletion: ProcPtr; {completion routine} ioResult: OSErr; {result code} ioNamePtr: StringPtr; {reserved} ioVRefNum: Integer; {reserved} ioRefNum: Integer; {driver reference number} csCode: Integer; {primary command code} CASE MPPParmType OF OpenSktParm, CloseSktParm, WriteDDPParm: ( socket: Byte; {socket number} checksumFlag: Byte; {checksum flag} listener: Ptr; {For POpenSkt, pointer to socket } { listener routine. For PWriteDDP, } { pointer to write-data structure.}
Field Description
ioCompletion
- A pointer to a completion routine that you can provide. When you execute the
POpenSkt
function asynchronously, DDP calls your completion routine when it completes execution of the function. SpecifyNIL
for this field if you do not wish to provide a completion routine. If you execute thePOpenSkt
function synchronously, it ignores theioCompletion
field.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.
socket
- The number of the socket to be opened, closed, or from which to send data.