Important: The information in this document is obsolete and should not be used for new development.
dspNewCID
ThedspNewCIDroutine creates a connection ID to be used in setting up a connection.You use the
PBControlfunction to call thedspNewCIDroutine. See "Routines" on page 5-43 for a description of thePBControlfunction.
--> ioCompletion ProcPtr A pointer to a completion routine. <-- ioResult OSErr The function result. --> ioCRefNum Integer The driver reference number. --> csCode Integer Always dspNewCIDfor this function.--> ccbRefNum Integer The CCB reference number. <-- newCID Integer The ID of new connection.
Field Description
csCode- The routine selector, always equal to
dspNewCIDfor this routine.ccbRefNum- The connection control block (CCB) reference number that was returned by the
dspNewCIDroutine 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 theremoteCIDparameter when it calls thedspOpenroutine.DESCRIPTION
ThedspNewCIDroutine 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 thedspInitroutine to establish a connection end. Next, you must call thedspNewCIDroutine 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 thedspOpenroutine inocEstablishmode to cause ADSP to open the connection.ASSEMBLY-LANGUAGE INFORMATION
To execute thedspNewCIDroutine from assembly language, call the_Controltrap macro with a value ofdspNewCIDin thecsCodefield 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 thedspInitroutine, described on page 5-45.To obtain a connection-end ID, use the
sdspOpenroutine, described on page 5-54.To open a connection in
ocEstablishmode, use thedspOpenroutine, described on see page 5-48.