Important: The information in this document is obsolete and should not be used for new development.
dspNewCID
ThedspNewCID
routine creates a connection ID to be used in setting up a connection.You use the
PBControl
function to call thedspNewCID
routine. See "Routines" on page 5-43 for a description of thePBControl
function.
--> ioCompletion ProcPtr A pointer to a completion routine. <-- ioResult OSErr The function result. --> ioCRefNum Integer The driver reference number. --> csCode Integer Always dspNewCID
for this function.--> ccbRefNum Integer The CCB reference number. <-- newCID Integer The ID of new connection.
Field Description
csCode
- The routine selector, always equal to
dspNewCID
for this routine.ccbRefNum
- The connection control block (CCB) reference number that was returned by the
dspNewCID
routine for the connection end that
you want to use.newCID
- The connection-end ID that this routine returns. You must provide this number to the client of the remote connection end so that
it can use it for theremoteCID
parameter when it calls thedspOpen
routine.DESCRIPTION
ThedspNewCID
routine causes ADSP to assign an ID to a connection end without opening the connection end or attempting to establish a connection with a remote connection end. Use this routine only if you implement your own protocol to establish communication with a remote connection end. You must first use thedspInit
routine to establish a connection end. Next, you must call thedspNewCID
routine to obtain a connection-end ID. Then you must establish communication with a remote connection end and pass the ID to the remote connection end. Finally, you must call thedspOpen
routine inocEstablish
mode to cause ADSP to open the connection.ASSEMBLY-LANGUAGE INFORMATION
To execute thedspNewCID
routine from assembly language, call the_Control
trap macro with a value ofdspNewCID
in thecsCode
field of the parameter block.RESULT CODES
noErr 0 No error errState -1278 Connection is not closed errRefNum -1280 Bad connection reference number SEE ALSO
To establish a connection, use thedspInit
routine, described on page 5-45.To obtain a connection-end ID, use the
sdspOpen
routine, described on page 5-54.To open a connection in
ocEstablish
mode, use thedspOpen
routine, described on see page 5-48.